diff --git a/annotation/src/main/java/edu/wpi/grip/annotation/operation/Description.java b/annotation/src/main/java/edu/wpi/grip/annotation/operation/Description.java index 0d33c8a1db..efdac43ecb 100644 --- a/annotation/src/main/java/edu/wpi/grip/annotation/operation/Description.java +++ b/annotation/src/main/java/edu/wpi/grip/annotation/operation/Description.java @@ -25,16 +25,16 @@ String name(); /** - * A brief summary of the operation. In-depth descriptions, usage guides, and examples - * should be on the wiki, not here. + * A brief summary of the operation. In-depth descriptions, usage guides, and examples should be + * on the wiki, not here. * * @return a summary of the operation */ String summary(); /** - * The category the operation belongs to. Defaults to - * {@link OperationCategory#MISCELLANEOUS MISCELLANEOUS}. + * The category the operation belongs to. Defaults to {@link OperationCategory#MISCELLANEOUS + * MISCELLANEOUS}. * * @return the category to which the operation belongs */ diff --git a/annotation/src/main/java/edu/wpi/grip/annotation/processor/ClassListProcessor.java b/annotation/src/main/java/edu/wpi/grip/annotation/processor/ClassListProcessor.java index d7f1471b30..3a0ca265b4 100644 --- a/annotation/src/main/java/edu/wpi/grip/annotation/processor/ClassListProcessor.java +++ b/annotation/src/main/java/edu/wpi/grip/annotation/processor/ClassListProcessor.java @@ -32,8 +32,8 @@ * Processes elements with the GRIP annotations and generates class list files for them. */ @SupportedAnnotationTypes({ - "edu.wpi.grip.annotation.*", - "com.thoughtworks.xstream.annotations.XStreamAlias" + "edu.wpi.grip.annotation.*", + "com.thoughtworks.xstream.annotations.XStreamAlias" }) @SupportedSourceVersion(SourceVersion.RELEASE_8) @AutoService(Processor.class) diff --git a/build.gradle.kts b/build.gradle.kts index 22ecc22f0d..f82d9c224e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -156,7 +156,7 @@ javaSubprojects { } tasks.withType().configureEach { - sourceCompatibility = "8" + sourceCompatibility = "11" } } diff --git a/core/core.gradle.kts b/core/core.gradle.kts index 6a3184108a..60947992b8 100644 --- a/core/core.gradle.kts +++ b/core/core.gradle.kts @@ -25,11 +25,11 @@ dependencies { api(project(":annotation")) annotationProcessor(project(":annotation")) api(group = "com.google.code.findbugs", name = "jsr305", version = "3.0.1") - api(group = "org.bytedeco", name = "javacv", version = "1.3") - api(group = "org.bytedeco.javacpp-presets", name = "opencv", version = "3.4.3-1.4.3") - api(group = "org.bytedeco.javacpp-presets", name = "opencv", version = "3.4.3-1.4.3", classifier = if (withCuda) "$os-gpu" else os) + api(group = "org.bytedeco", name = "javacv", version = "1.5.5") + api(group = "org.bytedeco", name = "opencv-platform", version = "4.5.1-1.5.5") + api(group = "org.bytedeco", name = "opencv-platform-gpu", version = "4.5.1-1.5.5") api(group = "org.bytedeco.javacpp-presets", name = "videoinput", version = "0.200-1.1", classifier = os) - api(group = "org.bytedeco.javacpp-presets", name = "ffmpeg", version = "0.200-1.3", classifier = os) + api(group = "org.bytedeco.javacpp-presets", name = "ffmpeg", version = "4.1-1.4.4", classifier = os) api(group = "org.python", name = "jython", version = "2.7.0") api(group = "com.thoughtworks.xstream", name = "xstream", version = "1.4.10") api(group = "org.apache.commons", name = "commons-lang3", version = "3.5") diff --git a/core/libs/opencv-3.0.0-1.1-linux-frc.jar b/core/libs/opencv-3.0.0-1.1-linux-frc.jar deleted file mode 100644 index 642b3bad87..0000000000 Binary files a/core/libs/opencv-3.0.0-1.1-linux-frc.jar and /dev/null differ diff --git a/core/src/main/java/edu/wpi/grip/core/Cleaner.java b/core/src/main/java/edu/wpi/grip/core/Cleaner.java index 38fe3dda51..a50f900abc 100644 --- a/core/src/main/java/edu/wpi/grip/core/Cleaner.java +++ b/core/src/main/java/edu/wpi/grip/core/Cleaner.java @@ -13,20 +13,20 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS; /** - * Cleans up unused objects by periodically calling {@link System#gc()} to nudge the - * garbage collector to clean up dead native (JavaCV) objects. This is required because JavaCV - * objects only free their native memory when they're garbage collected, so if they accumulate in - * the heap, the app will use about 40x the memory as used heap (i.e. 230MB of used heap results in - * about 9.8GB of used memory for the process). This is because {@code Mats} and anything - * else extending {@link org.bytedeco.javacpp.Pointer} use native memory that greatly exceeds the - * Java objects size on the heap. + * Cleans up unused objects by periodically calling {@link System#gc()} to nudge the garbage + * collector to clean up dead native (JavaCV) objects. This is required because JavaCV objects only + * free their native memory when they're garbage collected, so if they accumulate in the heap, the + * app will use about 40x the memory as used heap (i.e. 230MB of used heap results in about 9.8GB of + * used memory for the process). This is because {@code Mats} and anything else extending {@link + * org.bytedeco.javacpp.Pointer} use native memory that greatly exceeds the Java objects size on the + * heap. * *

JavaCV has a system property {@code org.bytedeco.javacpp.maxphysicalbytes} that it uses to - * determine when to start deallocating native memory. However, this only results in calls to - * {@code System.gc()} and imposes a hard upper limit on native memory use, limiting large images - * or long pipelines. It's also not very portable: running from source needs it to be passed - * as a JVM argument with gradle, and it can't be adjusted based on the amount of memory on the - * system it's installed on. For us, manually running System.gc() periodically is a better solution. + * determine when to start deallocating native memory. However, this only results in calls to {@code + * System.gc()} and imposes a hard upper limit on native memory use, limiting large images or long + * pipelines. It's also not very portable: running from source needs it to be passed as a JVM + * argument with gradle, and it can't be adjusted based on the amount of memory on the system it's + * installed on. For us, manually running System.gc() periodically is a better solution. *

*/ @Singleton diff --git a/core/src/main/java/edu/wpi/grip/core/CoreCommandLineHelper.java b/core/src/main/java/edu/wpi/grip/core/CoreCommandLineHelper.java index d24487a090..9e12825a1e 100644 --- a/core/src/main/java/edu/wpi/grip/core/CoreCommandLineHelper.java +++ b/core/src/main/java/edu/wpi/grip/core/CoreCommandLineHelper.java @@ -85,7 +85,6 @@ protected CoreCommandLineHelper(Option... additionalOptions) { * returning from this method. This will also occur if the help option is specified. * * @param args the command line arguments to parse - * * @return a CommandLine object that can be queried for command line options and their values */ @SuppressWarnings({"checkstyle:regexp", "PMD.SystemPrintln"}) @@ -152,7 +151,6 @@ void exit() { * * @param args the parsed command line arguments * @param project the project to load the file into - * * @throws IOException if the file couldn't be loaded */ public void loadFile(CommandLine args, Project project) throws IOException { diff --git a/core/src/main/java/edu/wpi/grip/core/FileManager.java b/core/src/main/java/edu/wpi/grip/core/FileManager.java index 930e0ce890..c23ec9e182 100644 --- a/core/src/main/java/edu/wpi/grip/core/FileManager.java +++ b/core/src/main/java/edu/wpi/grip/core/FileManager.java @@ -6,10 +6,10 @@ public interface FileManager { /** - * Saves an array of bytes to a file. - * - * @param image The image to save - * @param fileName The file name to save - */ + * Saves an array of bytes to a file. + * + * @param image The image to save + * @param fileName The file name to save + */ void saveImage(byte[] image, String fileName); } diff --git a/core/src/main/java/edu/wpi/grip/core/Loggers.java b/core/src/main/java/edu/wpi/grip/core/Loggers.java index 31418e0443..b86c9e9a29 100644 --- a/core/src/main/java/edu/wpi/grip/core/Loggers.java +++ b/core/src/main/java/edu/wpi/grip/core/Loggers.java @@ -17,8 +17,8 @@ private Loggers() { } /** - * Sets up loggers to print to stdout and to ~/GRIP/GRIP.log. This should only be called once - * in the application lifecycle, at startup. + * Sets up loggers to print to stdout and to ~/GRIP/GRIP.log. This should only be called once in + * the application lifecycle, at startup. */ public static void setupLoggers() { // Set up the global level logger. This handles IO for all loggers. diff --git a/core/src/main/java/edu/wpi/grip/core/MatWrapper.java b/core/src/main/java/edu/wpi/grip/core/MatWrapper.java index 5636a68662..19238edcd1 100644 --- a/core/src/main/java/edu/wpi/grip/core/MatWrapper.java +++ b/core/src/main/java/edu/wpi/grip/core/MatWrapper.java @@ -1,34 +1,34 @@ package edu.wpi.grip.core; -import org.bytedeco.javacpp.opencv_core; -import org.bytedeco.javacpp.opencv_core.GpuMat; -import org.bytedeco.javacpp.opencv_core.Mat; -import org.bytedeco.javacpp.opencv_core.Size; +import org.bytedeco.opencv.opencv_core.GpuMat; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Scalar; +import org.bytedeco.opencv.opencv_core.Size; import java.util.Objects; import java.util.function.Function; -import static org.bytedeco.javacpp.opencv_core.CV_16S; -import static org.bytedeco.javacpp.opencv_core.CV_16U; -import static org.bytedeco.javacpp.opencv_core.CV_32F; -import static org.bytedeco.javacpp.opencv_core.CV_32S; -import static org.bytedeco.javacpp.opencv_core.CV_64F; -import static org.bytedeco.javacpp.opencv_core.CV_8S; -import static org.bytedeco.javacpp.opencv_core.CV_8U; -import static org.bytedeco.javacpp.opencv_core.IPL_DEPTH_16S; -import static org.bytedeco.javacpp.opencv_core.IPL_DEPTH_16U; -import static org.bytedeco.javacpp.opencv_core.IPL_DEPTH_1U; -import static org.bytedeco.javacpp.opencv_core.IPL_DEPTH_32F; -import static org.bytedeco.javacpp.opencv_core.IPL_DEPTH_32S; -import static org.bytedeco.javacpp.opencv_core.IPL_DEPTH_64F; -import static org.bytedeco.javacpp.opencv_core.IPL_DEPTH_8S; -import static org.bytedeco.javacpp.opencv_core.IPL_DEPTH_8U; +import static org.bytedeco.opencv.global.opencv_core.CV_16S; +import static org.bytedeco.opencv.global.opencv_core.CV_16U; +import static org.bytedeco.opencv.global.opencv_core.CV_32F; +import static org.bytedeco.opencv.global.opencv_core.CV_32S; +import static org.bytedeco.opencv.global.opencv_core.CV_64F; +import static org.bytedeco.opencv.global.opencv_core.CV_8S; +import static org.bytedeco.opencv.global.opencv_core.CV_8U; +import static org.bytedeco.opencv.global.opencv_core.IPL_DEPTH_16S; +import static org.bytedeco.opencv.global.opencv_core.IPL_DEPTH_16U; +import static org.bytedeco.opencv.global.opencv_core.IPL_DEPTH_1U; +import static org.bytedeco.opencv.global.opencv_core.IPL_DEPTH_32F; +import static org.bytedeco.opencv.global.opencv_core.IPL_DEPTH_32S; +import static org.bytedeco.opencv.global.opencv_core.IPL_DEPTH_64F; +import static org.bytedeco.opencv.global.opencv_core.IPL_DEPTH_8S; +import static org.bytedeco.opencv.global.opencv_core.IPL_DEPTH_8U; /** - * Wraps a GPU mat and a CPU mat and allows device memory and host memory - * to be used semi-transparently. A wrapper may change between wrapping an image in host memory or - * an image in GPU memory. A wrapper is used to minimize copies between host and device memory, - * which may take longer than the time savings of using a CUDA-accelerated operation. + * Wraps a GPU mat and a CPU mat and allows device memory and host memory to be used + * semi-transparently. A wrapper may change between wrapping an image in host memory or an image in + * GPU memory. A wrapper is used to minimize copies between host and device memory, which may take + * longer than the time savings of using a CUDA-accelerated operation. * *

Data is lazily copied between host and device memory when needed. Wrappers that * are only accessed from CPU operations will never have their data stored in device memory. @@ -50,8 +50,8 @@ public final class MatWrapper { private boolean isCpu = true; /** - * Flags whether or not the wrapped value has been modified since the most recent read. This - * is used so that the value is only copied between host and device when it's needed. + * Flags whether or not the wrapped value has been modified since the most recent read. This is + * used so that the value is only copied between host and device when it's needed. */ private boolean changed = false; @@ -107,8 +107,8 @@ public boolean isGpu() { /** * Gets the raw CPU mat. This should only be used when this mat is used as a {@code dst} parameter - * to an OpenCV function. If you want to get the current value as a mat in host memory, use - * {@link #getCpu()}. + * to an OpenCV function. If you want to get the current value as a mat in host memory, use {@link + * #getCpu()}. */ public Mat rawCpu() { // Assume the mat is about to be modified as a `dst` parameter to an OpenCV function @@ -120,8 +120,8 @@ public Mat rawCpu() { /** * Gets the raw GPU mat. This should only be used when this mat is used as a {@code dst} parameter - * to an OpenCV function. If you want to get the current value as a mat in GPU memory, use - * {@link #getGpu()}. + * to an OpenCV function. If you want to get the current value as a mat in GPU memory, use {@link + * #getGpu()}. */ public GpuMat rawGpu() { // Assume the mat is about to be modified as a `dst` parameter to an OpenCV function @@ -147,9 +147,9 @@ public Mat getCpu() { /** * Gets this mat as a mat in GPU memory. If this is {@link #isCpu() backed by host memory}, the - * host memory will be copied into the GPU mat before being returned. This copy only happens - * after {@link #set(Mat) set(Mat)} is called, and only once between successive calls; - * invocations of this method after the first copy will not perform another. + * host memory will be copied into the GPU mat before being returned. This copy only happens after + * {@link #set(Mat) set(Mat)} is called, and only once between successive calls; invocations of + * this method after the first copy will not perform another. */ public GpuMat getGpu() { if (changed && isCpu) { @@ -182,8 +182,8 @@ public void set(GpuMat mat) { } /** - * Sets this as being backed by the given wrapper. This wrapper will be functionally equivalent - * to the one given. + * Sets this as being backed by the given wrapper. This wrapper will be functionally equivalent to + * the one given. */ public void set(MatWrapper wrapper) { if (wrapper.isCpu()) { @@ -370,7 +370,7 @@ public void create(int rows, int cols, int type) { * * @param value Assigned scalar converted to the actual array type. */ - public MatWrapper put(opencv_core.Scalar value) { + public MatWrapper put(Scalar value) { if (isCpu()) { cpuMat.put(value); } else { diff --git a/core/src/main/java/edu/wpi/grip/core/Operation.java b/core/src/main/java/edu/wpi/grip/core/Operation.java index ea2281343d..625bcff5ea 100644 --- a/core/src/main/java/edu/wpi/grip/core/Operation.java +++ b/core/src/main/java/edu/wpi/grip/core/Operation.java @@ -32,6 +32,6 @@ public interface Operation { * by {@link Step#setRemoved()} to ensure correct synchronization. */ default void cleanUp() { - /* no-op */ + /* no-op */ } } diff --git a/core/src/main/java/edu/wpi/grip/core/OperationDescription.java b/core/src/main/java/edu/wpi/grip/core/OperationDescription.java index c673f586b9..883b0c0b23 100644 --- a/core/src/main/java/edu/wpi/grip/core/OperationDescription.java +++ b/core/src/main/java/edu/wpi/grip/core/OperationDescription.java @@ -30,8 +30,8 @@ public class OperationDescription { private final ImmutableSet aliases; /** - * Creates an operation description from a {@link Description @Description} annotation on - * an operation subclass. + * Creates an operation description from a {@link Description @Description} annotation on an + * operation subclass. */ public static OperationDescription from(Description description) { checkNotNull(description, "The description annotation cannot be null"); @@ -46,8 +46,8 @@ public static OperationDescription from(Description description) { } /** - * Creates an operation description from a {@link Description @Description} annotation on - * an operation subclass. The class is assumed to have the annotation; be careful when using this + * Creates an operation description from a {@link Description @Description} annotation on an + * operation subclass. The class is assumed to have the annotation; be careful when using this * method. * * @param clazz the class to generate a description for @@ -73,10 +73,9 @@ private OperationDescription(String name, /** * Creates a new {@link Builder} instance to create a new {@code OperationDescription} object. The - * created descriptor has a default category of - * {@link OperationCategory#MISCELLANEOUS MISCELLANEOUS} and no icon; use the - * {@link Builder#category(OperationCategory) .category()} and {@link Builder#icon(Icon) .icon()} - * methods to override the default values. + * created descriptor has a default category of {@link OperationCategory#MISCELLANEOUS + * MISCELLANEOUS} and no icon; use the {@link Builder#category(OperationCategory) .category()} and + * {@link Builder#icon(Icon) .icon()} methods to override the default values. */ public static Builder builder() { return new Builder() diff --git a/core/src/main/java/edu/wpi/grip/core/StepIndexer.java b/core/src/main/java/edu/wpi/grip/core/StepIndexer.java index 34f81c2a38..635e0619ef 100644 --- a/core/src/main/java/edu/wpi/grip/core/StepIndexer.java +++ b/core/src/main/java/edu/wpi/grip/core/StepIndexer.java @@ -16,7 +16,8 @@ public interface StepIndexer extends Comparator { int indexOf(Step step); /** - * Compares two steps based on their indexes. This is not consistent with {@code equals()}. + * Compares two steps based on their indexes. This is not consistent with {@code + * equals()}. * * @param o1 the first step to compare * @param o2 the second step to compare diff --git a/core/src/main/java/edu/wpi/grip/core/cuda/CudaVerifier.java b/core/src/main/java/edu/wpi/grip/core/cuda/CudaVerifier.java index ed61b13915..8f19798377 100644 --- a/core/src/main/java/edu/wpi/grip/core/cuda/CudaVerifier.java +++ b/core/src/main/java/edu/wpi/grip/core/cuda/CudaVerifier.java @@ -30,8 +30,8 @@ public CudaVerifier(AccelerationMode accelerationMode, } /** - * Verifies the presence of a CUDA runtime, if required by the GRIP runtime, and exits the - * app if no compatible CUDA runtime is available. + * Verifies the presence of a CUDA runtime, if required by the GRIP runtime, and exits the app if + * no compatible CUDA runtime is available. */ public void verifyCuda() { if (!verify()) { @@ -51,7 +51,7 @@ public void verifyCuda() { * GRIP is not using CUDA acceleration, this will always return {@code true}. * * @return false if GRIP is using CUDA acceleration but no compatible CUDA runtime is available, - * true otherwise + * true otherwise */ public boolean verify() { if (accelerationMode.isUsingCuda()) { diff --git a/core/src/main/java/edu/wpi/grip/core/cuda/LoadingCudaDetector.java b/core/src/main/java/edu/wpi/grip/core/cuda/LoadingCudaDetector.java index f19ffbb84b..987195a434 100644 --- a/core/src/main/java/edu/wpi/grip/core/cuda/LoadingCudaDetector.java +++ b/core/src/main/java/edu/wpi/grip/core/cuda/LoadingCudaDetector.java @@ -1,7 +1,7 @@ package edu.wpi.grip.core.cuda; import org.bytedeco.javacpp.Loader; -import org.bytedeco.javacpp.opencv_cudaarithm; +import org.bytedeco.opencv.global.opencv_cudaarithm; /** * Checks if CUDA is available by attempting to load one of the OpenCV CUDA class' JNI. If the JNI diff --git a/core/src/main/java/edu/wpi/grip/core/events/DirtiesSaveEvent.java b/core/src/main/java/edu/wpi/grip/core/events/DirtiesSaveEvent.java index b66a591124..929c061a91 100644 --- a/core/src/main/java/edu/wpi/grip/core/events/DirtiesSaveEvent.java +++ b/core/src/main/java/edu/wpi/grip/core/events/DirtiesSaveEvent.java @@ -3,7 +3,8 @@ /** * An event that can potentially dirty the save file. * - *

These events ensure that anything that changes causes the save file to be flagged as dirty and + *

These events ensure that anything that changes causes the save file to be flagged as dirty + * and * in need of being saved for the project to be deemed "clean" again. */ public interface DirtiesSaveEvent { diff --git a/core/src/main/java/edu/wpi/grip/core/events/SocketChangedEvent.java b/core/src/main/java/edu/wpi/grip/core/events/SocketChangedEvent.java index cedeb845d4..7890f5d362 100644 --- a/core/src/main/java/edu/wpi/grip/core/events/SocketChangedEvent.java +++ b/core/src/main/java/edu/wpi/grip/core/events/SocketChangedEvent.java @@ -32,9 +32,9 @@ public boolean isRegarding(Socket socket) { } /** - * This event will only dirty the save if the InputSocket does not have connections. - * Thus the value can only have been changed by a UI component. - * If the socket has connections then the value change is triggered by another socket's change. + * This event will only dirty the save if the InputSocket does not have connections. Thus the + * value can only have been changed by a UI component. If the socket has connections then the + * value change is triggered by another socket's change. * * @return True if this should dirty the save. */ diff --git a/core/src/main/java/edu/wpi/grip/core/events/WarningEvent.java b/core/src/main/java/edu/wpi/grip/core/events/WarningEvent.java index 59ccf36a6f..0b811bf112 100644 --- a/core/src/main/java/edu/wpi/grip/core/events/WarningEvent.java +++ b/core/src/main/java/edu/wpi/grip/core/events/WarningEvent.java @@ -21,10 +21,10 @@ public class WarningEvent implements LoggableEvent { /** * Creates a new warning event. * - * @param header the header or title of the warning (e.g. "Cannot generate code"). - * This should be short and descriptive. - * @param body the body of the warning. - * This should go into detail about what the user did wrong. + * @param header the header or title of the warning (e.g. "Cannot generate code"). This should be + * short and descriptive. + * @param body the body of the warning. This should go into detail about what the user did + * wrong. */ public WarningEvent(String header, String body) { checkNotNull(header, "Header text cannot be null"); diff --git a/core/src/main/java/edu/wpi/grip/core/exception/GripException.java b/core/src/main/java/edu/wpi/grip/core/exception/GripException.java index 081572a2f5..043af60f17 100644 --- a/core/src/main/java/edu/wpi/grip/core/exception/GripException.java +++ b/core/src/main/java/edu/wpi/grip/core/exception/GripException.java @@ -1,10 +1,8 @@ - package edu.wpi.grip.core.exception; /** - * An exception thrown when something goes wrong with an internal GRIP - * operation. This class is {@code abstract} to encourage making subclasses - * for specific cases. + * An exception thrown when something goes wrong with an internal GRIP operation. This class is + * {@code abstract} to encourage making subclasses for specific cases. */ public abstract class GripException extends RuntimeException { diff --git a/core/src/main/java/edu/wpi/grip/core/exception/GripServerException.java b/core/src/main/java/edu/wpi/grip/core/exception/GripServerException.java index cd54d09c83..7095e04d28 100644 --- a/core/src/main/java/edu/wpi/grip/core/exception/GripServerException.java +++ b/core/src/main/java/edu/wpi/grip/core/exception/GripServerException.java @@ -1,8 +1,8 @@ package edu.wpi.grip.core.exception; /** - * An exception thrown when something goes wrong in the - * {@link edu.wpi.grip.core.http.GripServer GripServer}. + * An exception thrown when something goes wrong in the {@link edu.wpi.grip.core.http.GripServer + * GripServer}. */ public class GripServerException extends GripException { diff --git a/core/src/main/java/edu/wpi/grip/core/http/ContextStore.java b/core/src/main/java/edu/wpi/grip/core/http/ContextStore.java index 48c7923c8f..423b935ae0 100644 --- a/core/src/main/java/edu/wpi/grip/core/http/ContextStore.java +++ b/core/src/main/java/edu/wpi/grip/core/http/ContextStore.java @@ -36,16 +36,16 @@ public void record(@Nonnull String context) throws IllegalArgumentException { * this will do nothing and return {@code false}. * * @param context the context to erase - * @return true if the context was erased, false if it wasn't erased - * or if it wasn't present to begin with. + * @return true if the context was erased, false if it wasn't erased or if it wasn't present to + * begin with. */ public boolean erase(@Nullable String context) { return store.remove(context); } /** - * Checks if the given context has been recorded in this store. - * If {@code context} is {@code null}, this will return {@code false}. + * Checks if the given context has been recorded in this store. If {@code context} is {@code + * null}, this will return {@code false}. * * @param context the context to check * @return true if the given context has been recorded in this store diff --git a/core/src/main/java/edu/wpi/grip/core/http/GenericHandler.java b/core/src/main/java/edu/wpi/grip/core/http/GenericHandler.java index 0a4fe3bcb8..408cf8aaf5 100644 --- a/core/src/main/java/edu/wpi/grip/core/http/GenericHandler.java +++ b/core/src/main/java/edu/wpi/grip/core/http/GenericHandler.java @@ -49,8 +49,8 @@ protected GenericHandler() { } /** - * Creates a generic handler that handles requests for the given context. - * That context will not be claimed. + * Creates a generic handler that handles requests for the given context. That context will not be + * claimed. * *

Note that the context is case sensitive. * diff --git a/core/src/main/java/edu/wpi/grip/core/http/GripServer.java b/core/src/main/java/edu/wpi/grip/core/http/GripServer.java index 36e6a006df..51c2183ed2 100644 --- a/core/src/main/java/edu/wpi/grip/core/http/GripServer.java +++ b/core/src/main/java/edu/wpi/grip/core/http/GripServer.java @@ -73,21 +73,20 @@ public enum State { public static final String UPLOAD_PATH = ROOT_PATH + "/upload"; /** - * The path for uploading images. To upload an image, post an HTTP event to - * {@code /GRIP/upload/image}, with the image bytes as the data. + * The path for uploading images. To upload an image, post an HTTP event to {@code + * /GRIP/upload/image}, with the image bytes as the data. */ public static final String IMAGE_UPLOAD_PATH = UPLOAD_PATH + "/image"; /** - * The path for setting which pipeline to run. To set the pipeline, post an - * HTTP event to {@code /GRIP/upload/pipeline}, - * with the content of the pipeline save file as the data. + * The path for setting which pipeline to run. To set the pipeline, post an HTTP event to {@code + * /GRIP/upload/pipeline}, with the content of the pipeline save file as the data. */ public static final String PIPELINE_UPLOAD_PATH = UPLOAD_PATH + "/pipeline"; /** - * The path for requesting data. Data will be returned as a json-formatted - * map of the outputs of all requested data sets. + * The path for requesting data. Data will be returned as a json-formatted map of the outputs of + * all requested data sets. * *

For example, performing a {@code GET} request on the path * {@code /GRIP/data?foo&bar} will return a map such as @@ -125,7 +124,6 @@ public enum State { * Checks if the given TCP port is valid for a server to run on. This doesn't check availability. * * @param port the port to check - * * @return true if the port is valid, false if not */ public static boolean isPortValid(int port) { @@ -169,8 +167,8 @@ public void addHandler(Handler handler) { } /** - * Removes the given handler from the server. - * Does nothing if the server does not have that handler. + * Removes the given handler from the server. Does nothing if the server does not have that + * handler. * * @param handler the handler to remove */ @@ -179,8 +177,8 @@ public void removeHandler(Handler handler) { } /** - * Starts this server. - * Has no effect if the server has already been started or if it's been stopped. + * Starts this server. Has no effect if the server has already been started or if it's been + * stopped. */ public void start() { if (state == State.PRE_RUN) { @@ -194,10 +192,10 @@ public void start() { } /** - * Stops this server. Note that a shutdown hook has been registered to call - * this method, so it's unlikely that this should need to be called. If you - * need to restart the server, use {@link #restart()} as this method will kill the - * internal HTTP server, which cannot be restarted by {@link #start()}. + * Stops this server. Note that a shutdown hook has been registered to call this method, so it's + * unlikely that this should need to be called. If you need to restart the server, use {@link + * #restart()} as this method will kill the internal HTTP server, which cannot be restarted by + * {@link #start()}. */ public void stop() { if (state == State.RUNNING) { diff --git a/core/src/main/java/edu/wpi/grip/core/http/NoContextHandler.java b/core/src/main/java/edu/wpi/grip/core/http/NoContextHandler.java index 20578ea5f9..ef82395cb4 100644 --- a/core/src/main/java/edu/wpi/grip/core/http/NoContextHandler.java +++ b/core/src/main/java/edu/wpi/grip/core/http/NoContextHandler.java @@ -9,8 +9,8 @@ import javax.servlet.http.HttpServletResponse; /** - * Jetty handler for all contexts that are not explicitly claimed by another handler. - * This will respond to HTTP requests with a {@code 404 Not Found} error and HTML page. + * Jetty handler for all contexts that are not explicitly claimed by another handler. This will + * respond to HTTP requests with a {@code 404 Not Found} error and HTML page. */ class NoContextHandler extends GenericHandler { @@ -20,11 +20,11 @@ class NoContextHandler extends GenericHandler { "

404 - Not Found

There is no context for path: '%s'"; /** - * Creates a new {@code NoContextHandler} that handles every context not in the given - * {@code ContextStore}. + * Creates a new {@code NoContextHandler} that handles every context not in the given {@code + * ContextStore}. * - * @param store Any context not in this {@code ContextStore} will get a - * {@code 404 Not Found} error. + * @param store Any context not in this {@code ContextStore} will get a {@code 404 Not Found} + * error. */ public NoContextHandler(ContextStore store) { super(); diff --git a/core/src/main/java/edu/wpi/grip/core/metrics/BenchmarkRunner.java b/core/src/main/java/edu/wpi/grip/core/metrics/BenchmarkRunner.java index b749c670ba..2144c19be5 100644 --- a/core/src/main/java/edu/wpi/grip/core/metrics/BenchmarkRunner.java +++ b/core/src/main/java/edu/wpi/grip/core/metrics/BenchmarkRunner.java @@ -22,8 +22,8 @@ import static com.google.common.base.Preconditions.checkArgument; /** - * Benchmark runner. This runs the pipeline multiple times to collect data about how long each - * step takes to run. + * Benchmark runner. This runs the pipeline multiple times to collect data about how long each step + * takes to run. */ @Singleton public class BenchmarkRunner { diff --git a/core/src/main/java/edu/wpi/grip/core/metrics/CsvExporter.java b/core/src/main/java/edu/wpi/grip/core/metrics/CsvExporter.java index 39691ff498..acc34ca042 100644 --- a/core/src/main/java/edu/wpi/grip/core/metrics/CsvExporter.java +++ b/core/src/main/java/edu/wpi/grip/core/metrics/CsvExporter.java @@ -52,7 +52,6 @@ public CsvExporter(int numCols, String... headers) { * Appends a data row to the bottom of the table. * * @param data the row to append - * * @throws NullPointerException if {@code data} is null, or if it contains null elements * @throws IllegalArgumentException if the number of elements in {@code data} is not exactly equal * to the number of columns specified in the constructor @@ -66,7 +65,6 @@ public void addRow(List data) { * Appends a data row to the bottom of the table. * * @param data the row to append - * * @throws NullPointerException if {@code data} is null, or if it contains null elements * @throws IllegalArgumentException if the number of elements in {@code data} is not exactly equal * to the number of columns specified in the constructor diff --git a/core/src/main/java/edu/wpi/grip/core/metrics/Statistics.java b/core/src/main/java/edu/wpi/grip/core/metrics/Statistics.java index 19a6ba6d1e..87c31609f6 100644 --- a/core/src/main/java/edu/wpi/grip/core/metrics/Statistics.java +++ b/core/src/main/java/edu/wpi/grip/core/metrics/Statistics.java @@ -111,8 +111,8 @@ public double getStandardDeviation() { * Calculates the 'hotness' of the given value based on these statistics. Using a {@code value} * that is not in the data set used to create these statistics will most likely have a useless * result. Hotness is equal to the number of standard deviations above the mean, or zero if the - * input value is not above the mean. Effectively, this means - * {@code hotness(x) == max(0, ((x - mean) / standard deviation))}. + * input value is not above the mean. Effectively, this means {@code hotness(x) == max(0, ((x - + * mean) / standard deviation))}. * *

If this set of statistics was calculated from less than two data points, 'hotness' doesn't * mean anything and this method will always return zero. diff --git a/core/src/main/java/edu/wpi/grip/core/metrics/Timer.java b/core/src/main/java/edu/wpi/grip/core/metrics/Timer.java index e97e8e4323..eaab6e39ed 100644 --- a/core/src/main/java/edu/wpi/grip/core/metrics/Timer.java +++ b/core/src/main/java/edu/wpi/grip/core/metrics/Timer.java @@ -55,11 +55,11 @@ public synchronized void started() { } /** - * Stops the timer. This will post a {@link TimerEvent} containing the elapsed time - * and analysis to the event bus. + * Stops the timer. This will post a {@link TimerEvent} containing the elapsed time and analysis + * to the event bus. * - * @throws IllegalStateException if this a call to this method is not preceded by a call to - * {@link #started()}. + * @throws IllegalStateException if this a call to this method is not preceded by a call to {@link + * #started()}. */ public synchronized void stop() { if (!stopwatch.isRunning()) { @@ -105,8 +105,8 @@ public void time(Runnable target) { } /** - * Gets the time elapsed between a call to {@link #started()} and a call to {@link #stop()}, - * in microseconds. + * Gets the time elapsed between a call to {@link #started()} and a call to {@link #stop()}, in + * microseconds. */ public long getElapsedTime() { return elapsedTime; diff --git a/core/src/main/java/edu/wpi/grip/core/observables/Observable.java b/core/src/main/java/edu/wpi/grip/core/observables/Observable.java index b3501f8851..f253fba552 100644 --- a/core/src/main/java/edu/wpi/grip/core/observables/Observable.java +++ b/core/src/main/java/edu/wpi/grip/core/observables/Observable.java @@ -8,8 +8,8 @@ public interface Observable { /** - * Add an observer to this observable. It will be notified of any future changes to the value - * of this observable. Listeners will be fired in the order in which they were added, and on the + * Add an observer to this observable. It will be notified of any future changes to the value of + * this observable. Listeners will be fired in the order in which they were added, and on the * thread that updates the observed value. Because of this, listeners should take as little time * as possible to run (unless submitting a long-running task to a worker thread). */ diff --git a/core/src/main/java/edu/wpi/grip/core/operations/CVOperations.java b/core/src/main/java/edu/wpi/grip/core/operations/CVOperations.java index 3f8427cad3..967c343aea 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/CVOperations.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/CVOperations.java @@ -23,43 +23,43 @@ import com.google.common.eventbus.EventBus; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core.Point; -import org.bytedeco.javacpp.opencv_core.Scalar; -import org.bytedeco.javacpp.opencv_core.Size; -import org.bytedeco.javacpp.opencv_cudaarithm; -import org.bytedeco.javacpp.opencv_cudafilters.Filter; -import org.bytedeco.javacpp.opencv_cudaimgproc; -import org.bytedeco.javacpp.opencv_imgproc; - -import static org.bytedeco.javacpp.opencv_core.absdiff; -import static org.bytedeco.javacpp.opencv_core.add; -import static org.bytedeco.javacpp.opencv_core.addWeighted; -import static org.bytedeco.javacpp.opencv_core.bitwise_and; -import static org.bytedeco.javacpp.opencv_core.bitwise_not; -import static org.bytedeco.javacpp.opencv_core.bitwise_or; -import static org.bytedeco.javacpp.opencv_core.bitwise_xor; -import static org.bytedeco.javacpp.opencv_core.compare; -import static org.bytedeco.javacpp.opencv_core.divide; -import static org.bytedeco.javacpp.opencv_core.extractChannel; -import static org.bytedeco.javacpp.opencv_core.flip; -import static org.bytedeco.javacpp.opencv_core.max; -import static org.bytedeco.javacpp.opencv_core.min; -import static org.bytedeco.javacpp.opencv_core.multiply; -import static org.bytedeco.javacpp.opencv_core.scaleAdd; -import static org.bytedeco.javacpp.opencv_core.subtract; -import static org.bytedeco.javacpp.opencv_core.transpose; -import static org.bytedeco.javacpp.opencv_cudafilters.createSobelFilter; -import static org.bytedeco.javacpp.opencv_imgproc.GaussianBlur; -import static org.bytedeco.javacpp.opencv_imgproc.Laplacian; -import static org.bytedeco.javacpp.opencv_imgproc.Sobel; -import static org.bytedeco.javacpp.opencv_imgproc.adaptiveThreshold; -import static org.bytedeco.javacpp.opencv_imgproc.applyColorMap; -import static org.bytedeco.javacpp.opencv_imgproc.cvtColor; -import static org.bytedeco.javacpp.opencv_imgproc.dilate; -import static org.bytedeco.javacpp.opencv_imgproc.medianBlur; -import static org.bytedeco.javacpp.opencv_imgproc.rectangle; -import static org.bytedeco.javacpp.opencv_imgproc.resize; -import static org.bytedeco.javacpp.opencv_imgproc.threshold; +import org.bytedeco.opencv.global.opencv_cudaarithm; +import org.bytedeco.opencv.global.opencv_cudaimgproc; +import org.bytedeco.opencv.global.opencv_imgproc; +import org.bytedeco.opencv.opencv_core.Point; +import org.bytedeco.opencv.opencv_core.Scalar; +import org.bytedeco.opencv.opencv_core.Size; +import org.bytedeco.opencv.opencv_cudafilters.Filter; + +import static org.bytedeco.opencv.global.opencv_core.absdiff; +import static org.bytedeco.opencv.global.opencv_core.add; +import static org.bytedeco.opencv.global.opencv_core.addWeighted; +import static org.bytedeco.opencv.global.opencv_core.bitwise_and; +import static org.bytedeco.opencv.global.opencv_core.bitwise_not; +import static org.bytedeco.opencv.global.opencv_core.bitwise_or; +import static org.bytedeco.opencv.global.opencv_core.bitwise_xor; +import static org.bytedeco.opencv.global.opencv_core.compare; +import static org.bytedeco.opencv.global.opencv_core.divide; +import static org.bytedeco.opencv.global.opencv_core.extractChannel; +import static org.bytedeco.opencv.global.opencv_core.flip; +import static org.bytedeco.opencv.global.opencv_core.max; +import static org.bytedeco.opencv.global.opencv_core.min; +import static org.bytedeco.opencv.global.opencv_core.multiply; +import static org.bytedeco.opencv.global.opencv_core.scaleAdd; +import static org.bytedeco.opencv.global.opencv_core.subtract; +import static org.bytedeco.opencv.global.opencv_core.transpose; +import static org.bytedeco.opencv.global.opencv_cudafilters.createSobelFilter; +import static org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur; +import static org.bytedeco.opencv.global.opencv_imgproc.Laplacian; +import static org.bytedeco.opencv.global.opencv_imgproc.Sobel; +import static org.bytedeco.opencv.global.opencv_imgproc.adaptiveThreshold; +import static org.bytedeco.opencv.global.opencv_imgproc.applyColorMap; +import static org.bytedeco.opencv.global.opencv_imgproc.cvtColor; +import static org.bytedeco.opencv.global.opencv_imgproc.dilate; +import static org.bytedeco.opencv.global.opencv_imgproc.medianBlur; +import static org.bytedeco.opencv.global.opencv_imgproc.rectangle; +import static org.bytedeco.opencv.global.opencv_imgproc.resize; +import static org.bytedeco.opencv.global.opencv_imgproc.threshold; /** * A list of all of the raw opencv operations. diff --git a/core/src/main/java/edu/wpi/grip/core/operations/CudaOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/CudaOperation.java index a6e572a3d6..43bf7b308b 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/CudaOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/CudaOperation.java @@ -8,8 +8,8 @@ import edu.wpi.grip.core.sockets.SocketHint; import edu.wpi.grip.core.sockets.SocketHints; -import org.bytedeco.javacpp.opencv_core.GpuMat; -import org.bytedeco.javacpp.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.GpuMat; +import org.bytedeco.opencv.opencv_core.Mat; /** * A partial implementation of Operation that has the option to use CUDA acceleration. diff --git a/core/src/main/java/edu/wpi/grip/core/operations/Operations.java b/core/src/main/java/edu/wpi/grip/core/operations/Operations.java index 868a2c6afa..8c651280f0 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/Operations.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/Operations.java @@ -99,12 +99,12 @@ public class Operations { } /** - * Creates an operation description for the given operation subclass. The subclass must - * be annotated with {@link Description @Description} or a {@code NullPointerException} will - * be thrown. + * Creates an operation description for the given operation subclass. The subclass must be + * annotated with {@link Description @Description} or a {@code NullPointerException} will be + * thrown. * - * @throws NullPointerException if {@code clazz} is null, or if it is not annotated with - * {@code @Description} + * @throws NullPointerException if {@code clazz} is null, or if it is not annotated with {@code + * @Description} */ private OperationDescription descriptionFor(Class clazz) { return OperationDescription.from(clazz.getAnnotation(Description.class)); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/BlurOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/BlurOperation.java index 43f09fd0ce..e242b56b17 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/BlurOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/BlurOperation.java @@ -13,30 +13,30 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core.GpuMat; -import org.bytedeco.javacpp.opencv_cudaimgproc; +import org.bytedeco.opencv.global.opencv_cudaimgproc; +import org.bytedeco.opencv.opencv_core.GpuMat; +import org.bytedeco.opencv.opencv_core.Size; +import org.bytedeco.opencv.opencv_cudafilters.Filter; import java.util.List; -import static org.bytedeco.javacpp.opencv_core.CV_8UC3; -import static org.bytedeco.javacpp.opencv_core.CV_8UC4; -import static org.bytedeco.javacpp.opencv_core.Size; -import static org.bytedeco.javacpp.opencv_cudafilters.Filter; -import static org.bytedeco.javacpp.opencv_cudafilters.createGaussianFilter; -import static org.bytedeco.javacpp.opencv_imgproc.CV_BGR2BGRA; -import static org.bytedeco.javacpp.opencv_imgproc.CV_BGRA2BGR; -import static org.bytedeco.javacpp.opencv_imgproc.GaussianBlur; -import static org.bytedeco.javacpp.opencv_imgproc.bilateralFilter; -import static org.bytedeco.javacpp.opencv_imgproc.blur; -import static org.bytedeco.javacpp.opencv_imgproc.medianBlur; +import static org.bytedeco.opencv.global.opencv_core.CV_8UC3; +import static org.bytedeco.opencv.global.opencv_core.CV_8UC4; +import static org.bytedeco.opencv.global.opencv_cudafilters.createGaussianFilter; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_BGR2BGRA; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_BGRA2BGR; +import static org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur; +import static org.bytedeco.opencv.global.opencv_imgproc.bilateralFilter; +import static org.bytedeco.opencv.global.opencv_imgproc.blur; +import static org.bytedeco.opencv.global.opencv_imgproc.medianBlur; /** * An {@link Operation} that softens an image using one of several different filters. */ @Description(name = "Blur", - summary = "Blurs an image to remove noise", - category = OperationCategory.IMAGE_PROCESSING, - iconName = "blur") + summary = "Blurs an image to remove noise", + category = OperationCategory.IMAGE_PROCESSING, + iconName = "blur") public class BlurOperation extends CudaOperation { private final SocketHint typeHint = SocketHints.createEnumSocketHint("Type", Type.BOX); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/CannyEdgeOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/CannyEdgeOperation.java index 3c561e1d8f..ce02306ec3 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/CannyEdgeOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/CannyEdgeOperation.java @@ -13,20 +13,20 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import org.bytedeco.javacpp.opencv_cudaimgproc.CannyEdgeDetector; +import org.bytedeco.opencv.opencv_cudaimgproc.CannyEdgeDetector; import java.util.List; -import static org.bytedeco.javacpp.opencv_cudaimgproc.createCannyEdgeDetector; -import static org.bytedeco.javacpp.opencv_imgproc.Canny; +import static org.bytedeco.opencv.global.opencv_cudaimgproc.createCannyEdgeDetector; +import static org.bytedeco.opencv.global.opencv_imgproc.Canny; /** * An operation that performs canny edge detection on an image. */ @Description(name = "CV Canny", - summary = "Performs canny edge detection on a grayscale image", - category = OperationCategory.OPENCV, - iconName = "opencv") + summary = "Performs canny edge detection on a grayscale image", + category = OperationCategory.OPENCV, + iconName = "opencv") public class CannyEdgeOperation extends CudaOperation { private final SocketHint lowThreshHint diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/CascadeClassifierOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/CascadeClassifierOperation.java index 0bca69bd7d..c3b5c16928 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/CascadeClassifierOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/CascadeClassifierOperation.java @@ -12,11 +12,11 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core.Mat; -import org.bytedeco.javacpp.opencv_core.Rect; -import org.bytedeco.javacpp.opencv_core.RectVector; -import org.bytedeco.javacpp.opencv_core.Size; -import org.bytedeco.javacpp.opencv_objdetect.CascadeClassifier; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Rect; +import org.bytedeco.opencv.opencv_core.RectVector; +import org.bytedeco.opencv.opencv_core.Size; +import org.bytedeco.opencv.opencv_objdetect.CascadeClassifier; import java.util.ArrayList; import java.util.List; @@ -25,9 +25,9 @@ * Operation for identifying parts of an image with a cascade classifier. */ @Description(name = "Cascade Cassifier", - summary = "Runs a Haar cascade classifier on an image", - category = OperationCategory.FEATURE_DETECTION, - iconName = "opencv") + summary = "Runs a Haar cascade classifier on an image", + category = OperationCategory.FEATURE_DETECTION, + iconName = "opencv") public class CascadeClassifierOperation implements Operation { private final SocketHint imageHint = diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/ContoursReport.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/ContoursReport.java index 555ddc1058..f8426d7537 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/ContoursReport.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/ContoursReport.java @@ -8,16 +8,17 @@ import com.google.auto.value.AutoValue; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.MatVector; +import org.bytedeco.opencv.opencv_core.Rect; + import java.util.ArrayList; import java.util.List; import java.util.Optional; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.MatVector; -import static org.bytedeco.javacpp.opencv_core.Rect; -import static org.bytedeco.javacpp.opencv_imgproc.boundingRect; -import static org.bytedeco.javacpp.opencv_imgproc.contourArea; -import static org.bytedeco.javacpp.opencv_imgproc.convexHull; +import static org.bytedeco.opencv.global.opencv_imgproc.boundingRect; +import static org.bytedeco.opencv.global.opencv_imgproc.contourArea; +import static org.bytedeco.opencv.global.opencv_imgproc.convexHull; /** * The output of {@link FindContoursOperation}. This stores a list of contours (which is basically diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/ConvexHullsOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/ConvexHullsOperation.java index 0724ee3e91..d717a6a70c 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/ConvexHullsOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/ConvexHullsOperation.java @@ -10,18 +10,19 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; +import org.bytedeco.opencv.opencv_core.MatVector; + import java.util.List; -import static org.bytedeco.javacpp.opencv_core.MatVector; -import static org.bytedeco.javacpp.opencv_imgproc.convexHull; +import static org.bytedeco.opencv.global.opencv_imgproc.convexHull; /** * An {@link Operation} that finds the convex hull of each of a list of contours. This can help * remove holes in detected shapes, making them easier to analyze. */ @Description(name = "Convex Hulls", - summary = "Compute the convex hulls of contours", - category = OperationCategory.FEATURE_DETECTION) + summary = "Compute the convex hulls of contours", + category = OperationCategory.FEATURE_DETECTION) public class ConvexHullsOperation implements Operation { private final SocketHint contoursHint = new SocketHint.Builder<>(ContoursReport diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/CropOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/CropOperation.java index d432526273..e586699c0f 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/CropOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/CropOperation.java @@ -11,19 +11,19 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import java.util.List; +import org.bytedeco.opencv.opencv_core.Rect; -import static org.bytedeco.javacpp.opencv_core.Rect; +import java.util.List; /** - * Crop an image to an exact width and height using one of several origin modes. Cropping - * images down can be a useful optimization. + * Crop an image to an exact width and height using one of several origin modes. Cropping images + * down can be a useful optimization. */ @Description(name = "Crop", - summary = "Crop an image to an exact size", - category = OperationCategory.IMAGE_PROCESSING, - iconName = "crop") + summary = "Crop an image to an exact size", + category = OperationCategory.IMAGE_PROCESSING, + iconName = "crop") public class CropOperation implements Operation { private final InputSocket inputSocket; @@ -88,11 +88,11 @@ public void perform() { final Origin origin = originSocket.getValue().get(); final Rect regionOfInterest = new Rect( - x.intValue() + (int) (origin.xOffsetMultiplier * width.intValue()), - y.intValue() + (int) (origin.yOffsetMultiplier * height.intValue()), - width.intValue(), - height.intValue() - ); + x.intValue() + (int) (origin.xOffsetMultiplier * width.intValue()), + y.intValue() + (int) (origin.yOffsetMultiplier * height.intValue()), + width.intValue(), + height.intValue() + ); //apply() returns a sub-matrix; It does not modify the input Mat: https://github.com/WPIRoboticsProjects/GRIP/pull/926 if (input.isCpu()) { diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/DesaturateOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/DesaturateOperation.java index 00ea135388..5ceac8fb72 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/DesaturateOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/DesaturateOperation.java @@ -11,21 +11,21 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_cudaimgproc; +import org.bytedeco.opencv.global.opencv_cudaimgproc; import java.util.List; -import static org.bytedeco.javacpp.opencv_imgproc.COLOR_BGR2GRAY; -import static org.bytedeco.javacpp.opencv_imgproc.COLOR_BGRA2GRAY; -import static org.bytedeco.javacpp.opencv_imgproc.cvtColor; +import static org.bytedeco.opencv.global.opencv_imgproc.COLOR_BGR2GRAY; +import static org.bytedeco.opencv.global.opencv_imgproc.COLOR_BGRA2GRAY; +import static org.bytedeco.opencv.global.opencv_imgproc.cvtColor; /** * An {@link Operation} that converts a color image into shades of gray. */ @Description(name = "Desaturate", - summary = "Convert a color image into shades of gray", - category = OperationCategory.IMAGE_PROCESSING, - iconName = "desaturate") + summary = "Convert a color image into shades of gray", + category = OperationCategory.IMAGE_PROCESSING, + iconName = "desaturate") public class DesaturateOperation extends CudaOperation { @Inject diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/DistanceTransformOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/DistanceTransformOperation.java index 0837d54680..142006a5bb 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/DistanceTransformOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/DistanceTransformOperation.java @@ -12,24 +12,24 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Mat; import java.util.List; -import static org.bytedeco.javacpp.opencv_core.CV_8U; -import static org.bytedeco.javacpp.opencv_imgproc.CV_DIST_C; -import static org.bytedeco.javacpp.opencv_imgproc.CV_DIST_L1; -import static org.bytedeco.javacpp.opencv_imgproc.CV_DIST_L2; -import static org.bytedeco.javacpp.opencv_imgproc.distanceTransform; +import static org.bytedeco.opencv.global.opencv_core.CV_8U; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_DIST_C; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_DIST_L1; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_DIST_L2; +import static org.bytedeco.opencv.global.opencv_imgproc.distanceTransform; /** - * GRIP {@link Operation} for {@link org.bytedeco.javacpp.opencv_imgproc#distanceTransform}. + * GRIP {@link Operation} for {@link org.bytedeco.opencv.global.opencv_imgproc#distanceTransform}. */ @Description(name = "Distance Transform", - summary = "Sets the values of pixels in a binary image to their distance to" - + " the nearest black pixel", - category = OperationCategory.IMAGE_PROCESSING, - iconName = "opencv") + summary = "Sets the values of pixels in a binary image to their distance to" + + " the nearest black pixel", + category = OperationCategory.IMAGE_PROCESSING, + iconName = "opencv") public class DistanceTransformOperation implements Operation { private final SocketHint srcHint = SocketHints.createImageSocketHint("Input"); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/FilterContoursOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/FilterContoursOperation.java index 7afbf03ab7..4c23c2cddb 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/FilterContoursOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/FilterContoursOperation.java @@ -11,15 +11,16 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.MatVector; +import org.bytedeco.opencv.opencv_core.Rect; + import java.util.List; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.MatVector; -import static org.bytedeco.javacpp.opencv_core.Rect; -import static org.bytedeco.javacpp.opencv_imgproc.arcLength; -import static org.bytedeco.javacpp.opencv_imgproc.boundingRect; -import static org.bytedeco.javacpp.opencv_imgproc.contourArea; -import static org.bytedeco.javacpp.opencv_imgproc.convexHull; +import static org.bytedeco.opencv.global.opencv_imgproc.arcLength; +import static org.bytedeco.opencv.global.opencv_imgproc.boundingRect; +import static org.bytedeco.opencv.global.opencv_imgproc.contourArea; +import static org.bytedeco.opencv.global.opencv_imgproc.convexHull; /** * An {@link Operation} that takes in a list of contours and outputs a list of any contours in the @@ -30,9 +31,9 @@ * we're actually looking for. So, this operation can help narrow them down. */ @Description(name = "Filter Contours", - summary = "Find contours matching certain criteria", - category = OperationCategory.FEATURE_DETECTION, - iconName = "find-contours") + summary = "Find contours matching certain criteria", + category = OperationCategory.FEATURE_DETECTION, + iconName = "find-contours") @SuppressWarnings("PMD.TooManyFields") public class FilterContoursOperation implements Operation { diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/FilterLinesOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/FilterLinesOperation.java index a7707c738e..da3f96547a 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/FilterLinesOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/FilterLinesOperation.java @@ -19,9 +19,9 @@ * to narrow down detected lines to only relevant ones. */ @Description(name = "Filter Lines", - summary = "Filter only lines from a Find Lines operation that fit certain criteria", - category = OperationCategory.FEATURE_DETECTION, - iconName = "filter-lines") + summary = "Filter only lines from a Find Lines operation that fit certain criteria", + category = OperationCategory.FEATURE_DETECTION, + iconName = "filter-lines") public class FilterLinesOperation implements Operation { private final SocketHint inputHint = @@ -85,7 +85,7 @@ public void perform() { || (line.angle() + 180.0 >= minAngle && line.angle() + 180.0 <= maxAngle)) .collect(Collectors.toList()); - linesOutputSocket.setValue(new LinesReport(inputLines.getLineSegmentDetector(), inputLines + linesOutputSocket.setValue(new LinesReport(inputLines.getFastLineDetector(), inputLines .getInput(), lines)); } } diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/FindBlobsOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/FindBlobsOperation.java index c661a3e37c..7906776cec 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/FindBlobsOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/FindBlobsOperation.java @@ -12,21 +12,21 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; +import org.bytedeco.opencv.opencv_core.KeyPoint; +import org.bytedeco.opencv.opencv_core.KeyPointVector; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_features2d.SimpleBlobDetector; + import java.util.ArrayList; import java.util.List; -import static org.bytedeco.javacpp.opencv_core.KeyPoint; -import static org.bytedeco.javacpp.opencv_core.KeyPointVector; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_features2d.SimpleBlobDetector; - /** * Find groups of similar pixels in a color or grayscale image. */ @Description(name = "Find Blobs", - summary = "Detects groups of pixels in an image", - category = OperationCategory.FEATURE_DETECTION, - iconName = "find-blobs") + summary = "Detects groups of pixels in an image", + category = OperationCategory.FEATURE_DETECTION, + iconName = "find-blobs") public class FindBlobsOperation implements Operation { private final SocketHint inputHint = SocketHints.createImageSocketHint("Input"); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/FindContoursOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/FindContoursOperation.java index 18285c16f1..97a913a7ca 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/FindContoursOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/FindContoursOperation.java @@ -12,23 +12,24 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.MatVector; + import java.util.List; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.MatVector; -import static org.bytedeco.javacpp.opencv_imgproc.CV_CHAIN_APPROX_TC89_KCOS; -import static org.bytedeco.javacpp.opencv_imgproc.CV_RETR_EXTERNAL; -import static org.bytedeco.javacpp.opencv_imgproc.CV_RETR_LIST; -import static org.bytedeco.javacpp.opencv_imgproc.findContours; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_CHAIN_APPROX_TC89_KCOS; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_RETR_EXTERNAL; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_RETR_LIST; +import static org.bytedeco.opencv.global.opencv_imgproc.findContours; /** * An {@link Operation} that, given a binary image, produces a list of contours of all of the shapes * in the image. */ @Description(name = "Find Contours", - summary = "Detects contours in a binary image", - category = OperationCategory.FEATURE_DETECTION, - iconName = "find-contours") + summary = "Detects contours in a binary image", + category = OperationCategory.FEATURE_DETECTION, + iconName = "find-contours") public class FindContoursOperation implements Operation { private final SocketHint inputHint = SocketHints.createImageSocketHint("Input"); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/FindLinesOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/FindLinesOperation.java index 4f9597ce63..07bae9e248 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/FindLinesOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/FindLinesOperation.java @@ -13,22 +13,22 @@ import com.google.inject.Inject; import org.bytedeco.javacpp.indexer.FloatIndexer; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_ximgproc.FastLineDetector; import java.util.ArrayList; import java.util.List; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_imgproc.COLOR_BGR2GRAY; -import static org.bytedeco.javacpp.opencv_imgproc.LineSegmentDetector; -import static org.bytedeco.javacpp.opencv_imgproc.cvtColor; +import static org.bytedeco.opencv.global.opencv_imgproc.COLOR_BGR2GRAY; +import static org.bytedeco.opencv.global.opencv_imgproc.cvtColor; /** * Find line segments in a color or grayscale image. */ @Description(name = "Find Lines", - summary = "Detects line segments in an image", - category = OperationCategory.FEATURE_DETECTION, - iconName = "find-lines") + summary = "Detects line segments in an image", + category = OperationCategory.FEATURE_DETECTION, + iconName = "find-lines") public class FindLinesOperation implements Operation { private final SocketHint inputHint = SocketHints.createImageSocketHint("Input"); @@ -65,7 +65,7 @@ public List getOutputSockets() { @SuppressWarnings("unchecked") public void perform() { final MatWrapper input = inputSocket.getValue().get(); - final LineSegmentDetector lsd = linesReportSocket.getValue().get().getLineSegmentDetector(); + final FastLineDetector lsd = linesReportSocket.getValue().get().getFastLineDetector(); final Mat lines = new Mat(); if (input.channels() == 1) { diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/HSLThresholdOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/HSLThresholdOperation.java index b7958754cb..d1da85a72b 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/HSLThresholdOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/HSLThresholdOperation.java @@ -13,24 +13,25 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Scalar; + import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.Scalar; -import static org.bytedeco.javacpp.opencv_core.inRange; -import static org.bytedeco.javacpp.opencv_imgproc.COLOR_BGR2HLS; -import static org.bytedeco.javacpp.opencv_imgproc.cvtColor; +import static org.bytedeco.opencv.global.opencv_core.inRange; +import static org.bytedeco.opencv.global.opencv_imgproc.COLOR_BGR2HLS; +import static org.bytedeco.opencv.global.opencv_imgproc.cvtColor; /** * An {@link Operation} that converts a color image into a binary image based on the HSL threshold * ranges. */ @Description(name = "HSL Threshold", - summary = "Segment an image based on hue, saturation, and luminance ranges", - category = OperationCategory.IMAGE_PROCESSING, - iconName = "threshold") + summary = "Segment an image based on hue, saturation, and luminance ranges", + category = OperationCategory.IMAGE_PROCESSING, + iconName = "threshold") public class HSLThresholdOperation extends ThresholdOperation { private static final Logger logger = Logger.getLogger(HSLThresholdOperation.class.getName()); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/HSVThresholdOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/HSVThresholdOperation.java index 5b0ef05d11..193d4669e8 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/HSVThresholdOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/HSVThresholdOperation.java @@ -12,25 +12,25 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core.Mat; -import org.bytedeco.javacpp.opencv_core.Scalar; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Scalar; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; -import static org.bytedeco.javacpp.opencv_core.inRange; -import static org.bytedeco.javacpp.opencv_imgproc.COLOR_BGR2HSV; -import static org.bytedeco.javacpp.opencv_imgproc.cvtColor; +import static org.bytedeco.opencv.global.opencv_core.inRange; +import static org.bytedeco.opencv.global.opencv_imgproc.COLOR_BGR2HSV; +import static org.bytedeco.opencv.global.opencv_imgproc.cvtColor; /** * An {@link Operation} that converts a color image into a binary image based on the HSV threshold * ranges for each channel. */ @Description(name = "HSV Threshold", - summary = "Segment an image based on hue, saturation, and value ranges", - category = OperationCategory.IMAGE_PROCESSING, - iconName = "threshold") + summary = "Segment an image based on hue, saturation, and value ranges", + category = OperationCategory.IMAGE_PROCESSING, + iconName = "threshold") public class HSVThresholdOperation extends ThresholdOperation { private static final Logger logger = Logger.getLogger(HSVThresholdOperation.class.getName()); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/LinesReport.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/LinesReport.java index 1bc34e855f..568409fa84 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/LinesReport.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/LinesReport.java @@ -7,11 +7,12 @@ import edu.wpi.grip.core.sockets.NoSocketTypeLabel; import edu.wpi.grip.core.sockets.Socket; +import org.bytedeco.opencv.opencv_ximgproc.FastLineDetector; + import java.util.Collections; import java.util.List; -import static org.bytedeco.javacpp.opencv_imgproc.LineSegmentDetector; -import static org.bytedeco.javacpp.opencv_imgproc.createLineSegmentDetector; +import static org.bytedeco.opencv.global.opencv_ximgproc.createFastLineDetector; /** * This class contains the results of a line detection algorithm. It has an input matrix (the image @@ -23,7 +24,7 @@ @PublishableObject @NoSocketTypeLabel public class LinesReport implements Publishable { - private final LineSegmentDetector lsd; + private final FastLineDetector fld; private final MatWrapper input; private final List lines; @@ -32,22 +33,22 @@ public class LinesReport implements Publishable { * LinesReports. */ public LinesReport() { - this(createLineSegmentDetector(), MatWrapper.emptyWrapper(), Collections.emptyList()); + this(createFastLineDetector(), MatWrapper.emptyWrapper(), Collections.emptyList()); } /** - * @param lsd The detector to be used. + * @param fld The detector to be used. * @param input The input matrix. * @param lines The lines that have been found. */ - public LinesReport(LineSegmentDetector lsd, MatWrapper input, List lines) { - this.lsd = lsd; + public LinesReport(FastLineDetector fld, MatWrapper input, List lines) { + this.fld = fld; this.input = input; this.lines = lines; } - protected LineSegmentDetector getLineSegmentDetector() { - return lsd; + protected FastLineDetector getFastLineDetector() { + return fld; } /** diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/MaskOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/MaskOperation.java index 4ce0599b5a..95970d2071 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/MaskOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/MaskOperation.java @@ -12,18 +12,19 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; +import org.bytedeco.opencv.opencv_core.Mat; + import java.util.List; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.bitwise_xor; +import static org.bytedeco.opencv.global.opencv_core.bitwise_xor; /** * An {@link Operation} that masks out an area of interest from an image. */ @Description(name = "Mask", - summary = "Filter out an area of interest in an image using a binary mask", - category = OperationCategory.IMAGE_PROCESSING, - iconName = "mask") + summary = "Filter out an area of interest in an image using a binary mask", + category = OperationCategory.IMAGE_PROCESSING, + iconName = "mask") public class MaskOperation implements Operation { private final SocketHint inputHint = SocketHints.createImageSocketHint("Input"); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/NormalizeOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/NormalizeOperation.java index 6d570e4d9c..1ebd5b426e 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/NormalizeOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/NormalizeOperation.java @@ -13,23 +13,23 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core; -import org.bytedeco.javacpp.opencv_cudaarithm; +import org.bytedeco.opencv.global.opencv_core; +import org.bytedeco.opencv.global.opencv_cudaarithm; import java.util.List; -import static org.bytedeco.javacpp.opencv_core.NORM_INF; -import static org.bytedeco.javacpp.opencv_core.NORM_L1; -import static org.bytedeco.javacpp.opencv_core.NORM_L2; -import static org.bytedeco.javacpp.opencv_core.NORM_MINMAX; +import static org.bytedeco.opencv.global.opencv_core.NORM_INF; +import static org.bytedeco.opencv.global.opencv_core.NORM_L1; +import static org.bytedeco.opencv.global.opencv_core.NORM_L2; +import static org.bytedeco.opencv.global.opencv_core.NORM_MINMAX; /** - * GRIP {@link Operation} for {@link org.bytedeco.javacpp.opencv_core#normalize}. + * GRIP {@link Operation} for {@link org.bytedeco.opencv.global.opencv_core#normalize}. */ @Description(name = "Normalize", - summary = "Normalizes or remaps the values of pixels in an image", - category = OperationCategory.IMAGE_PROCESSING, - iconName = "opencv") + summary = "Normalizes or remaps the values of pixels in an image", + category = OperationCategory.IMAGE_PROCESSING, + iconName = "opencv") public class NormalizeOperation extends CudaOperation { private final SocketHint typeHint = SocketHints.createEnumSocketHint("Type", Type.MINMAX); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/PublishVideoOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/PublishVideoOperation.java index 367827b39b..a0c7833a4f 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/PublishVideoOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/PublishVideoOperation.java @@ -25,8 +25,8 @@ import java.util.logging.Level; import java.util.logging.Logger; -import static org.bytedeco.javacpp.opencv_imgcodecs.CV_IMWRITE_JPEG_QUALITY; -import static org.bytedeco.javacpp.opencv_imgcodecs.imencode; +import static org.bytedeco.opencv.global.opencv_imgcodecs.IMWRITE_JPEG_QUALITY; +import static org.bytedeco.opencv.global.opencv_imgcodecs.imencode; /** * Publish an M-JPEG stream with the protocol used by SmartDashboard and the FRC Dashboard. This @@ -37,9 +37,9 @@ * /CameraServer.java */ @Description(name = "Publish Video", - summary = "Publish an MJPEG stream", - category = OperationCategory.NETWORK, - iconName = "publish-video") + summary = "Publish an MJPEG stream", + category = OperationCategory.NETWORK, + iconName = "publish-video") public class PublishVideoOperation implements Operation { private static final Logger logger = Logger.getLogger(PublishVideoOperation.class.getName()); @@ -139,7 +139,7 @@ public class PublishVideoOperation implements Operation { @Inject @SuppressWarnings("JavadocMethod") @SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", - justification = "Do not need to synchronize inside of a constructor") + justification = "Do not need to synchronize inside of a constructor") public PublishVideoOperation(InputSocket.Factory inputSocketFactory) { if (numSteps != 0) { throw new IllegalStateException("Only one instance of PublishVideoOperation may exist"); @@ -179,7 +179,7 @@ public void perform() { synchronized (imageLock) { imencode(".jpeg", inputSocket.getValue().get().getCpu(), imagePointer, - new IntPointer(CV_IMWRITE_JPEG_QUALITY, qualitySocket.getValue().get().intValue())); + new IntPointer(IMWRITE_JPEG_QUALITY, qualitySocket.getValue().get().intValue())); hasImage = true; imageLock.notifyAll(); } diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/RGBThresholdOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/RGBThresholdOperation.java index 43ecb57dd9..9755b885ca 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/RGBThresholdOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/RGBThresholdOperation.java @@ -12,22 +12,23 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Scalar; + import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.Scalar; -import static org.bytedeco.javacpp.opencv_core.inRange; +import static org.bytedeco.opencv.global.opencv_core.inRange; /** * An {@link Operation} that converts a color image into a binary image based on threshold ranges * for each channel. */ @Description(name = "RGB Threshold", - summary = "Segment an image based on color ranges", - category = OperationCategory.IMAGE_PROCESSING, - iconName = "threshold") + summary = "Segment an image based on color ranges", + category = OperationCategory.IMAGE_PROCESSING, + iconName = "threshold") public class RGBThresholdOperation extends ThresholdOperation { private static final Logger logger = Logger.getLogger(RGBThresholdOperation.class.getName()); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/RectsReport.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/RectsReport.java index 1ed7405e10..6a61f4ac94 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/RectsReport.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/RectsReport.java @@ -8,7 +8,7 @@ import com.google.common.collect.ImmutableList; -import org.bytedeco.javacpp.opencv_core.Rect; +import org.bytedeco.opencv.opencv_core.Rect; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/ResizeOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/ResizeOperation.java index 45b59f9daa..76de0bef35 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/ResizeOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/ResizeOperation.java @@ -11,16 +11,17 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Size; + import java.util.List; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.Size; -import static org.bytedeco.javacpp.opencv_imgproc.INTER_AREA; -import static org.bytedeco.javacpp.opencv_imgproc.INTER_CUBIC; -import static org.bytedeco.javacpp.opencv_imgproc.INTER_LANCZOS4; -import static org.bytedeco.javacpp.opencv_imgproc.INTER_LINEAR; -import static org.bytedeco.javacpp.opencv_imgproc.INTER_NEAREST; -import static org.bytedeco.javacpp.opencv_imgproc.resize; +import static org.bytedeco.opencv.global.opencv_imgproc.INTER_AREA; +import static org.bytedeco.opencv.global.opencv_imgproc.INTER_CUBIC; +import static org.bytedeco.opencv.global.opencv_imgproc.INTER_LANCZOS4; +import static org.bytedeco.opencv.global.opencv_imgproc.INTER_LINEAR; +import static org.bytedeco.opencv.global.opencv_imgproc.INTER_NEAREST; +import static org.bytedeco.opencv.global.opencv_imgproc.resize; /** * Scale an image to an exact width and height using one of several interpolation modes. Scaling @@ -28,9 +29,9 @@ * multiple images that are different sizes. */ @Description(name = "Resize Image", - summary = "Scale an image to an exact size", - category = OperationCategory.IMAGE_PROCESSING, - iconName = "resize") + summary = "Scale an image to an exact size", + category = OperationCategory.IMAGE_PROCESSING, + iconName = "resize") public class ResizeOperation implements Operation { private final InputSocket inputSocket; diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/SaveImageOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/SaveImageOperation.java index c83db14a05..cef7c6fcea 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/SaveImageOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/SaveImageOperation.java @@ -22,15 +22,15 @@ import java.util.Locale; import java.util.concurrent.TimeUnit; -import static org.bytedeco.javacpp.opencv_imgcodecs.CV_IMWRITE_JPEG_QUALITY; -import static org.bytedeco.javacpp.opencv_imgcodecs.imencode; +import static org.bytedeco.opencv.global.opencv_imgcodecs.IMWRITE_JPEG_QUALITY; +import static org.bytedeco.opencv.global.opencv_imgcodecs.imencode; /** * Save JPEG files periodically to the local disk. */ @Description(name = "Save Images to Disk", - summary = "Save image periodically to local disk", - iconName = "publish-video") + summary = "Save image periodically to local disk", + iconName = "publish-video") @SuppressWarnings("PMD.TooManyFields") public class SaveImageOperation implements Operation { @@ -122,7 +122,7 @@ public void perform() { imencode("." + fileTypesSocket.getValue().get(), inputSocket.getValue().get().getCpu(), imagePointer, - new IntPointer(CV_IMWRITE_JPEG_QUALITY, qualitySocket.getValue().get().intValue())); + new IntPointer(IMWRITE_JPEG_QUALITY, qualitySocket.getValue().get().intValue())); byte[] buffer = new byte[128 * 1024]; int bufferSize = (int) imagePointer.limit(); if (bufferSize > buffer.length) { diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/SwitchOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/SwitchOperation.java index ea3467b48c..dc796289c5 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/SwitchOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/SwitchOperation.java @@ -21,8 +21,8 @@ * InputSocket}. */ @Description(name = "Switch", - summary = "Switch between two possible input sockets using a boolean", - category = OperationCategory.LOGICAL) + summary = "Switch between two possible input sockets using a boolean", + category = OperationCategory.LOGICAL) public class SwitchOperation implements Operation { private final InputSocket switcherSocket; diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/ThresholdMoving.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/ThresholdMoving.java index ce9d79d193..d6146ced71 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/ThresholdMoving.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/ThresholdMoving.java @@ -10,9 +10,9 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core; -import org.bytedeco.javacpp.opencv_core.Mat; -import org.bytedeco.javacpp.opencv_core.Size; +import org.bytedeco.opencv.global.opencv_core; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Size; import java.util.List; @@ -20,8 +20,8 @@ * Finds the absolute difference between the current image and the previous image. */ @Description(name = "Threshold Moving", - summary = "Thresholds off parts of the image that have moved or changed between the" - + " previous and next image.") + summary = "Thresholds off parts of the image that have moved or changed between the" + + " previous and next image.") public class ThresholdMoving implements Operation { private final InputSocket imageSocket; diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/ThresholdOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/ThresholdOperation.java index fb7ad6ff84..19f7568dfc 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/ThresholdOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/ThresholdOperation.java @@ -2,8 +2,8 @@ import edu.wpi.grip.core.Operation; -import org.bytedeco.javacpp.opencv_core.Mat; -import org.bytedeco.javacpp.opencv_core.Scalar; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Scalar; public abstract class ThresholdOperation> implements Operation { diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/ValveOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/ValveOperation.java index 739d063ef6..b319774225 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/ValveOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/ValveOperation.java @@ -17,8 +17,8 @@ import java.util.Optional; @Description(name = "Valve", - summary = "Toggle an output socket on or off using a boolean", - category = OperationCategory.LOGICAL) + summary = "Toggle an output socket on or off using a boolean", + category = OperationCategory.LOGICAL) public class ValveOperation implements Operation { private final InputSocket switcherSocket; diff --git a/core/src/main/java/edu/wpi/grip/core/operations/composite/WatershedOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/composite/WatershedOperation.java index d84ebd835a..f71717c10b 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/composite/WatershedOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/composite/WatershedOperation.java @@ -12,40 +12,39 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.MatVector; +import org.bytedeco.opencv.opencv_core.Point; +import org.bytedeco.opencv.opencv_core.Point2f; +import org.bytedeco.opencv.opencv_core.Scalar; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.bytedeco.javacpp.opencv_core.CV_32SC1; -import static org.bytedeco.javacpp.opencv_core.CV_8UC1; -import static org.bytedeco.javacpp.opencv_core.CV_8UC3; -import static org.bytedeco.javacpp.opencv_core.LINE_8; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.MatVector; -import static org.bytedeco.javacpp.opencv_core.Point; -import static org.bytedeco.javacpp.opencv_core.Point2f; -import static org.bytedeco.javacpp.opencv_core.Scalar; -import static org.bytedeco.javacpp.opencv_core.bitwise_xor; -import static org.bytedeco.javacpp.opencv_imgproc.CV_CHAIN_APPROX_TC89_KCOS; -import static org.bytedeco.javacpp.opencv_imgproc.CV_FILLED; -import static org.bytedeco.javacpp.opencv_imgproc.CV_RETR_EXTERNAL; -import static org.bytedeco.javacpp.opencv_imgproc.circle; -import static org.bytedeco.javacpp.opencv_imgproc.drawContours; -import static org.bytedeco.javacpp.opencv_imgproc.findContours; -import static org.bytedeco.javacpp.opencv_imgproc.pointPolygonTest; -import static org.bytedeco.javacpp.opencv_imgproc.watershed; +import static org.bytedeco.opencv.global.opencv_core.CV_32SC1; +import static org.bytedeco.opencv.global.opencv_core.CV_8UC1; +import static org.bytedeco.opencv.global.opencv_core.CV_8UC3; +import static org.bytedeco.opencv.global.opencv_core.bitwise_xor; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_CHAIN_APPROX_TC89_KCOS; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_FILLED; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_RETR_EXTERNAL; +import static org.bytedeco.opencv.global.opencv_imgproc.LINE_8; +import static org.bytedeco.opencv.global.opencv_imgproc.circle; +import static org.bytedeco.opencv.global.opencv_imgproc.drawContours; +import static org.bytedeco.opencv.global.opencv_imgproc.findContours; +import static org.bytedeco.opencv.global.opencv_imgproc.pointPolygonTest; +import static org.bytedeco.opencv.global.opencv_imgproc.watershed; /** - * GRIP {@link Operation} for - * {@link org.bytedeco.javacpp.opencv_imgproc#watershed}. + * GRIP {@link Operation} for {@link org.bytedeco.opencv.global.opencv_imgproc#watershed}. */ @Description(name = "Watershed", - summary = "Isolates overlapping objects from the background and each other", - category = OperationCategory.FEATURE_DETECTION, - iconName = "opencv") + summary = "Isolates overlapping objects from the background and each other", + category = OperationCategory.FEATURE_DETECTION, + iconName = "opencv") public class WatershedOperation implements Operation { private final SocketHint srcHint = SocketHints.createImageSocketHint("Input"); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/network/NetworkPublisher.java b/core/src/main/java/edu/wpi/grip/core/operations/network/NetworkPublisher.java index 4d0ff2f643..360a4d0b53 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/network/NetworkPublisher.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/network/NetworkPublisher.java @@ -17,7 +17,7 @@ public abstract class NetworkPublisher implements AutoCloseable { private Optional name = Optional.empty(); protected NetworkPublisher() { - /* empty */ + /* empty */ } /** diff --git a/core/src/main/java/edu/wpi/grip/core/operations/network/PublishableProxy.java b/core/src/main/java/edu/wpi/grip/core/operations/network/PublishableProxy.java index bfacda6e56..85eefddaec 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/network/PublishableProxy.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/network/PublishableProxy.java @@ -6,17 +6,17 @@ import java.lang.annotation.Target; /** - * Marks a class as being a publishable proxy for a non-publishable type, like - * {@code BooleanPublishable} for {@code Boolean}. This annotation only has an affect when placed - * on a public, concrete, top-level class that implements {@link Publishable}. + * Marks a class as being a publishable proxy for a non-publishable type, like {@code + * BooleanPublishable} for {@code Boolean}. This annotation only has an affect when placed on a + * public, concrete, top-level class that implements {@link Publishable}. */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface PublishableProxy { /** - * The type(s) that the marked class is an publishable version of. The marked class must have - * a copy constructor for each type. + * The type(s) that the marked class is an publishable version of. The marked class must have a + * copy constructor for each type. * *

These types should use boxed classes instead of primitive types (e.g. {@code Integer.class} * instead of {@code int.class}). diff --git a/core/src/main/java/edu/wpi/grip/core/operations/network/PublishableRosProxy.java b/core/src/main/java/edu/wpi/grip/core/operations/network/PublishableRosProxy.java index 6ff6f868fd..75f5282d24 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/network/PublishableRosProxy.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/network/PublishableRosProxy.java @@ -6,9 +6,8 @@ import java.lang.annotation.Target; /** - * Marks a - * {@link edu.wpi.grip.core.operations.network.ros.JavaToMessageConverter JavaToMessageConverter} - * field as a proxy for a non-ROS-publishable type. + * Marks a {@link edu.wpi.grip.core.operations.network.ros.JavaToMessageConverter + * JavaToMessageConverter} field as a proxy for a non-ROS-publishable type. */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) diff --git a/core/src/main/java/edu/wpi/grip/core/operations/network/Vector2D.java b/core/src/main/java/edu/wpi/grip/core/operations/network/Vector2D.java index 6dbe1c6604..861a9d6b68 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/network/Vector2D.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/network/Vector2D.java @@ -3,10 +3,10 @@ import edu.wpi.grip.annotation.operation.PublishableObject; -import javax.annotation.concurrent.Immutable; +import org.bytedeco.opencv.opencv_core.Point; +import org.bytedeco.opencv.opencv_core.Size; -import static org.bytedeco.javacpp.opencv_core.Point; -import static org.bytedeco.javacpp.opencv_core.Size; +import javax.annotation.concurrent.Immutable; /** * A type publishable to a NetworkPublisher that consists of two numbers. JavaCV {@link Point}s and diff --git a/core/src/main/java/edu/wpi/grip/core/operations/network/http/DataHandler.java b/core/src/main/java/edu/wpi/grip/core/operations/network/http/DataHandler.java index 395e0b4e09..69314ee3bb 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/network/http/DataHandler.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/network/http/DataHandler.java @@ -33,8 +33,8 @@ import static javax.servlet.http.HttpServletResponse.SC_OK; /** - * Jetty handler for sending HTTP publishing data to a client. - * Only one instance of this class should exist at a time. + * Jetty handler for sending HTTP publishing data to a client. Only one instance of this class + * should exist at a time. */ @Singleton public final class DataHandler extends PedanticHandler { @@ -104,8 +104,8 @@ protected void handleIfPassed(String target, } /** - * Adds a supplier for data with the given name. - * The data will be published to {@code /GRIP/data} on the internal HTTP server. + * Adds a supplier for data with the given name. The data will be published to {@code /GRIP/data} + * on the internal HTTP server. * * @param name the name of the data * @param supplier a supplier for the data @@ -117,8 +117,8 @@ public void addDataSupplier(String name, Supplier supplier) { } /** - * Removes the supplier for data with the given name. Will do nothing if no such data exists, - * or if {@code name} is null. + * Removes the supplier for data with the given name. Will do nothing if no such data exists, or + * if {@code name} is null. * * @param name the name of the data to remove */ diff --git a/core/src/main/java/edu/wpi/grip/core/operations/network/http/HttpPublishOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/network/http/HttpPublishOperation.java index 41317dde03..7d44636d69 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/network/http/HttpPublishOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/network/http/HttpPublishOperation.java @@ -40,7 +40,6 @@ public HttpPublishOperation(InputSocket.Factory isf, * * @param dataType the type of the data published by the {@code HttpPublishOperation} for the data * type described - * * @return a description for an {@code HttpPublishOperation} that publishes the given data type */ public static OperationDescription descriptionFor(Class dataType) { diff --git a/core/src/main/java/edu/wpi/grip/core/operations/network/ros/JavaToMessageConverter.java b/core/src/main/java/edu/wpi/grip/core/operations/network/ros/JavaToMessageConverter.java index 266bd95176..d77b8c68c6 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/network/ros/JavaToMessageConverter.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/network/ros/JavaToMessageConverter.java @@ -137,7 +137,7 @@ public void convert(J javaType, Message message, MessageFactory messageFactory) } private abstract static class SimpleConverter extends - JavaToMessageConverter { + JavaToMessageConverter { private final BiConsumer messageDataAssigner; private SimpleConverter(String type, BiConsumer messageDataAssigner) { diff --git a/core/src/main/java/edu/wpi/grip/core/operations/opencv/MatFieldAccessor.java b/core/src/main/java/edu/wpi/grip/core/operations/opencv/MatFieldAccessor.java index 47311e2fa3..dd0c745916 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/opencv/MatFieldAccessor.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/opencv/MatFieldAccessor.java @@ -11,15 +11,15 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core.Mat; -import org.bytedeco.javacpp.opencv_core.Size; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Size; import java.util.List; @Description(name = "Get Mat Info", - summary = "Provide access to the various elements and properties of an image", - category = OperationCategory.OPENCV, - iconName = "opencv") + summary = "Provide access to the various elements and properties of an image", + category = OperationCategory.OPENCV, + iconName = "opencv") public class MatFieldAccessor implements CVOperation { private static final Mat defaultsMat = new Mat(); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/opencv/MinMaxLoc.java b/core/src/main/java/edu/wpi/grip/core/operations/opencv/MinMaxLoc.java index 5d975d46a1..2fab1ab38e 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/opencv/MinMaxLoc.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/opencv/MinMaxLoc.java @@ -12,9 +12,9 @@ import com.google.inject.Inject; import org.bytedeco.javacpp.DoublePointer; -import org.bytedeco.javacpp.opencv_core; -import org.bytedeco.javacpp.opencv_core.Mat; -import org.bytedeco.javacpp.opencv_core.Point; +import org.bytedeco.opencv.global.opencv_core; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Point; import java.util.List; @@ -22,9 +22,9 @@ * Operation to call {@link opencv_core#minMaxLoc}. */ @Description(name = "Find Min and Max", - summary = "Find the global minimum and maximum in a single channel grayscale image", - category = OperationCategory.OPENCV, - iconName = "opencv") + summary = "Find the global minimum and maximum in a single channel grayscale image", + category = OperationCategory.OPENCV, + iconName = "opencv") public class MinMaxLoc implements CVOperation { private final SocketHint srcInputHint = SocketHints.createImageSocketHint("Image"); diff --git a/core/src/main/java/edu/wpi/grip/core/operations/opencv/NewPointOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/opencv/NewPointOperation.java index 1cdfcde96b..d69d0e70e0 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/opencv/NewPointOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/opencv/NewPointOperation.java @@ -10,14 +10,14 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core.Point; +import org.bytedeco.opencv.opencv_core.Point; import java.util.List; @Description(name = "New Point", - summary = "Create a new point by (x,y) value", - category = OperationCategory.OPENCV, - iconName = "point") + summary = "Create a new point by (x,y) value", + category = OperationCategory.OPENCV, + iconName = "point") public class NewPointOperation implements CVOperation { private final SocketHint xHint = SocketHints.Inputs.createNumberSpinnerSocketHint("x", -1, diff --git a/core/src/main/java/edu/wpi/grip/core/operations/opencv/NewSizeOperation.java b/core/src/main/java/edu/wpi/grip/core/operations/opencv/NewSizeOperation.java index c7fc7606f7..19b0e81977 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/opencv/NewSizeOperation.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/opencv/NewSizeOperation.java @@ -10,15 +10,15 @@ import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core.Size; +import org.bytedeco.opencv.opencv_core.Size; import org.python.google.common.collect.ImmutableList; import java.util.List; @Description(name = "New Size", - summary = "Create a size by width and height values", - category = OperationCategory.OPENCV, - iconName = "size") + summary = "Create a size by width and height values", + category = OperationCategory.OPENCV, + iconName = "size") public class NewSizeOperation implements CVOperation { private final SocketHint widthHint = SocketHints.Inputs diff --git a/core/src/main/java/edu/wpi/grip/core/operations/opencv/enumeration/FlipCode.java b/core/src/main/java/edu/wpi/grip/core/operations/opencv/enumeration/FlipCode.java index 2288542d72..cf96c03642 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/opencv/enumeration/FlipCode.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/opencv/enumeration/FlipCode.java @@ -1,7 +1,7 @@ package edu.wpi.grip.core.operations.opencv.enumeration; /** - * FlipCode Codes from documentation in {@link org.bytedeco.javacpp.opencv_core#flip} + * FlipCode Codes from documentation in {@link org.bytedeco.opencv.global.opencv_core#flip} */ public enum FlipCode { // IMPORTANT! If you change the name of these values then you must also change the FileParser diff --git a/core/src/main/java/edu/wpi/grip/core/operations/templated/package-info.java b/core/src/main/java/edu/wpi/grip/core/operations/templated/package-info.java index 659fc7f2ee..125834af37 100644 --- a/core/src/main/java/edu/wpi/grip/core/operations/templated/package-info.java +++ b/core/src/main/java/edu/wpi/grip/core/operations/templated/package-info.java @@ -2,6 +2,6 @@ * Templates for various {@link edu.wpi.grip.core.Operation Operations}. Many of these classes * contain duplicated code because there is no way to create types at runtime. The best place to * start looking at this package is the - * {@link edu.wpi.grip.core.operations.templated.TemplateFactory}. + * {@link edu.wpi.grip.core.operations.templated.TemplateFactory}. */ package edu.wpi.grip.core.operations.templated; diff --git a/core/src/main/java/edu/wpi/grip/core/serialization/Project.java b/core/src/main/java/edu/wpi/grip/core/serialization/Project.java index a684ab70bc..f80a2c676c 100644 --- a/core/src/main/java/edu/wpi/grip/core/serialization/Project.java +++ b/core/src/main/java/edu/wpi/grip/core/serialization/Project.java @@ -120,9 +120,8 @@ void open(Reader reader) { * throw an IOException and will instead post a warning event to the event bus. * * @param file the file to save to - * * @return true if the project was successfully saved to the given file, or false if the file - * could not be written to + * could not be written to */ public boolean trySave(File file) { try { diff --git a/core/src/main/java/edu/wpi/grip/core/settings/AppSettings.java b/core/src/main/java/edu/wpi/grip/core/settings/AppSettings.java index 884158f62f..899f447223 100644 --- a/core/src/main/java/edu/wpi/grip/core/settings/AppSettings.java +++ b/core/src/main/java/edu/wpi/grip/core/settings/AppSettings.java @@ -9,14 +9,14 @@ import static com.google.common.base.Preconditions.checkArgument; /** - * Holds settings for the GRIP app. These settings are either global settings or set via the - * command line. + * Holds settings for the GRIP app. These settings are either global settings or set via the command + * line. */ @SuppressWarnings("JavadocMethod") public class AppSettings implements Settings, Cloneable { @Setting(label = "Internal server port", - description = "The port that the internal server should run on.") + description = "The port that the internal server should run on.") private int serverPort = GripServer.DEFAULT_PORT; public int getServerPort() { diff --git a/core/src/main/java/edu/wpi/grip/core/settings/CodeGenerationSettings.java b/core/src/main/java/edu/wpi/grip/core/settings/CodeGenerationSettings.java index 435c0815d5..d00c47f869 100644 --- a/core/src/main/java/edu/wpi/grip/core/settings/CodeGenerationSettings.java +++ b/core/src/main/java/edu/wpi/grip/core/settings/CodeGenerationSettings.java @@ -67,8 +67,8 @@ public class CodeGenerationSettings { * * @param language the language to generate to * @param className the name of the class to generate - * @param implementWpilibPipeline if the generated class should implement the - * WPILib VisionPipeline interface + * @param implementWpilibPipeline if the generated class should implement the WPILib + * VisionPipeline interface * @param saveDir the directory to save the generated file to * @param packageName the name of the Java package to place the file in * @param moduleName the name of the Python module @@ -193,8 +193,8 @@ public Builder moduleName(String moduleName) { } /** - * Builds a new {@code CodeGenerationSettings} object. This ensures that every required - * option has been set. + * Builds a new {@code CodeGenerationSettings} object. This ensures that every required option + * has been set. */ public CodeGenerationSettings build() { return new CodeGenerationSettings( diff --git a/core/src/main/java/edu/wpi/grip/core/settings/SettingsProvider.java b/core/src/main/java/edu/wpi/grip/core/settings/SettingsProvider.java index a82f9de1ab..ad954ec85d 100644 --- a/core/src/main/java/edu/wpi/grip/core/settings/SettingsProvider.java +++ b/core/src/main/java/edu/wpi/grip/core/settings/SettingsProvider.java @@ -8,7 +8,7 @@ public interface SettingsProvider { /** * This object may become out of date if the settings are edited by the user, so objects requiring * a preference value should also subscribe to - * {@link edu.wpi.grip.core.events.ProjectSettingsChangedEvent} + * {@link edu.wpi.grip.core.events.ProjectSettingsChangedEvent} * to get updates. * * @return The current per-project settings. @@ -17,8 +17,8 @@ public interface SettingsProvider { /** * Gets the current global app settings. This object may become out of date if the settings are - * edited by the user, so objects requiring a preference value should also subscribe to - * {@link edu.wpi.grip.core.events.AppSettingsChangedEvent} to get updates. + * edited by the user, so objects requiring a preference value should also subscribe to {@link + * edu.wpi.grip.core.events.AppSettingsChangedEvent} to get updates. * * @return the current global app settings */ @@ -26,8 +26,8 @@ public interface SettingsProvider { /** * Gets the current code generation settings. This object may become out of date if the settings - * are edited by the user, so objects requiring a preference value should also subscribe to - * {@link edu.wpi.grip.core.events.AppSettingsChangedEvent} to get updates. + * are edited by the user, so objects requiring a preference value should also subscribe to {@link + * edu.wpi.grip.core.events.AppSettingsChangedEvent} to get updates. * * @return the current code generation settings */ diff --git a/core/src/main/java/edu/wpi/grip/core/sockets/CudaSocket.java b/core/src/main/java/edu/wpi/grip/core/sockets/CudaSocket.java index d28d6c6099..0ec963783d 100644 --- a/core/src/main/java/edu/wpi/grip/core/sockets/CudaSocket.java +++ b/core/src/main/java/edu/wpi/grip/core/sockets/CudaSocket.java @@ -11,8 +11,8 @@ /** * A type of input socket that lets an operation know that it should prefer to use a - * CUDA-accelerated code path. If no compatible CUDA runtime is available, sockets of this type - * will always have a value of {@code false} and cannot be changed. + * CUDA-accelerated code path. If no compatible CUDA runtime is available, sockets of this type will + * always have a value of {@code false} and cannot be changed. */ public class CudaSocket extends InputSocketImpl { diff --git a/core/src/main/java/edu/wpi/grip/core/sockets/Socket.java b/core/src/main/java/edu/wpi/grip/core/sockets/Socket.java index 70866617b1..1944d0fbfb 100644 --- a/core/src/main/java/edu/wpi/grip/core/sockets/Socket.java +++ b/core/src/main/java/edu/wpi/grip/core/sockets/Socket.java @@ -38,13 +38,13 @@ public interface Socket { * change behaviour when the value is changed. */ default void onValueChanged() { - /* no-op */ + /* no-op */ } /** * Notifies this socket that the value changed. This is usually only needed for sockets that - * contain mutable data such as images or other native classes (Point, Size, etc) that are - * written to by OpenCV operations. + * contain mutable data such as images or other native classes (Point, Size, etc) that are written + * to by OpenCV operations. */ default void flagChanged() { setValueOptional(getValue()); @@ -57,7 +57,7 @@ default void flagChanged() { /** * Set the value of the socket, and fire off a - * {@link edu.wpi.grip.core.events.SocketChangedEvent}. + * {@link edu.wpi.grip.core.events.SocketChangedEvent}. * * @param value The value to store in this socket. Nullable. */ @@ -92,7 +92,8 @@ default void setValue(@Nullable T value) { void setSource(Optional source); /** - * INPUT if this is the input to a step, OUTPUT if this is the output of + * INPUT if this is the input to a step, OUTPUT if this is the output + * of * a step or source. * * @return The direction of the socket. @@ -119,9 +120,8 @@ default void setValue(@Nullable T value) { void removeConnection(Connection connection); /** - * Creates a simple text representation of this socket in the format - * {@code {owner type}/{owner name}/{identifier}}, e.g. {@code Step/Blur/Input} or - * {@code Source/Webcam 0/Image}. + * Creates a simple text representation of this socket in the format {@code {owner type}/{owner + * name}/{identifier}}, e.g. {@code Step/Blur/Input} or {@code Source/Webcam 0/Image}. * * @return a simple string representation of this socket. */ diff --git a/core/src/main/java/edu/wpi/grip/core/sockets/SocketHint.java b/core/src/main/java/edu/wpi/grip/core/sockets/SocketHint.java index b0005e73df..75940e6a7b 100644 --- a/core/src/main/java/edu/wpi/grip/core/sockets/SocketHint.java +++ b/core/src/main/java/edu/wpi/grip/core/sockets/SocketHint.java @@ -4,7 +4,8 @@ import com.google.common.base.MoreObjects; -import org.bytedeco.javacpp.opencv_objdetect.CascadeClassifier; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_objdetect.CascadeClassifier; import java.util.Arrays; import java.util.List; @@ -15,7 +16,6 @@ import javax.annotation.Nullable; import static com.google.common.base.Preconditions.checkNotNull; -import static org.bytedeco.javacpp.opencv_core.Mat; /** * A SocketHint is a descriptor that gives some information about one of the inputs or diff --git a/core/src/main/java/edu/wpi/grip/core/sockets/SocketHints.java b/core/src/main/java/edu/wpi/grip/core/sockets/SocketHints.java index f097965b11..fa6bfccb59 100644 --- a/core/src/main/java/edu/wpi/grip/core/sockets/SocketHints.java +++ b/core/src/main/java/edu/wpi/grip/core/sockets/SocketHints.java @@ -7,8 +7,8 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import org.bytedeco.javacpp.opencv_core.Point; -import org.bytedeco.javacpp.opencv_core.Size; +import org.bytedeco.opencv.opencv_core.Point; +import org.bytedeco.opencv.opencv_core.Size; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/src/main/java/edu/wpi/grip/core/sources/CSHttpCameraFrameGrabber.java b/core/src/main/java/edu/wpi/grip/core/sources/CSHttpCameraFrameGrabber.java index 0f41c35827..0ec012045e 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/CSHttpCameraFrameGrabber.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/CSHttpCameraFrameGrabber.java @@ -2,12 +2,13 @@ import edu.wpi.cscore.CameraServerJNI; import edu.wpi.cscore.HttpCamera; + import org.bytedeco.javacpp.Loader; -import org.bytedeco.javacpp.opencv_core.Mat; import org.bytedeco.javacv.Frame; import org.bytedeco.javacv.FrameConverter; import org.bytedeco.javacv.FrameGrabber; import org.bytedeco.javacv.OpenCVFrameConverter; +import org.bytedeco.opencv.opencv_core.Mat; import java.io.IOException; import java.util.concurrent.TimeUnit; @@ -40,7 +41,7 @@ public static void tryLoad() throws Exception { throw loadingException; } else { try { - Loader.load(org.bytedeco.javacpp.opencv_highgui.class); + Loader.load(org.bytedeco.opencv.global.opencv_highgui.class); CameraServerJNI.Helper.setExtractOnStaticLoad(false); CameraServerJNI.forceLoad(); } catch (Throwable t) { diff --git a/core/src/main/java/edu/wpi/grip/core/sources/CSUsbCameraFrameGrabber.java b/core/src/main/java/edu/wpi/grip/core/sources/CSUsbCameraFrameGrabber.java index b32854e22b..4ea028af11 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/CSUsbCameraFrameGrabber.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/CSUsbCameraFrameGrabber.java @@ -2,12 +2,13 @@ import edu.wpi.cscore.CameraServerJNI; import edu.wpi.cscore.UsbCamera; + import org.bytedeco.javacpp.Loader; -import org.bytedeco.javacpp.opencv_core.Mat; import org.bytedeco.javacv.Frame; import org.bytedeco.javacv.FrameConverter; import org.bytedeco.javacv.FrameGrabber; import org.bytedeco.javacv.OpenCVFrameConverter; +import org.bytedeco.opencv.opencv_core.Mat; import java.io.IOException; import java.util.concurrent.TimeUnit; @@ -38,7 +39,7 @@ public static void tryLoad() throws Exception { throw loadingException; } else { try { - Loader.load(org.bytedeco.javacpp.opencv_highgui.class); + Loader.load(org.bytedeco.opencv.global.opencv_highgui.class); CameraServerJNI.Helper.setExtractOnStaticLoad(false); CameraServerJNI.forceLoad(); } catch (Throwable t) { diff --git a/core/src/main/java/edu/wpi/grip/core/sources/CameraSource.java b/core/src/main/java/edu/wpi/grip/core/sources/CameraSource.java index 21ca578673..ed6396adfb 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/CameraSource.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/CameraSource.java @@ -23,9 +23,9 @@ import com.google.inject.assistedinject.AssistedInject; import com.thoughtworks.xstream.annotations.XStreamAlias; -import org.bytedeco.javacpp.opencv_core.Mat; import org.bytedeco.javacv.FrameGrabber; import org.bytedeco.javacv.OpenCVFrameGrabber; +import org.bytedeco.opencv.opencv_core.Mat; import java.io.IOException; import java.net.MalformedURLException; diff --git a/core/src/main/java/edu/wpi/grip/core/sources/CameraSourceUpdater.java b/core/src/main/java/edu/wpi/grip/core/sources/CameraSourceUpdater.java index cd6ff2ab4e..1b2e73cd4a 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/CameraSourceUpdater.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/CameraSourceUpdater.java @@ -1,6 +1,6 @@ package edu.wpi.grip.core.sources; -import org.bytedeco.javacpp.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Mat; public interface CameraSourceUpdater { void setFrameRate(double value); diff --git a/core/src/main/java/edu/wpi/grip/core/sources/ClassifierSource.java b/core/src/main/java/edu/wpi/grip/core/sources/ClassifierSource.java index ec59e4b431..bb872e1c0d 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/ClassifierSource.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/ClassifierSource.java @@ -10,7 +10,7 @@ import com.google.inject.assistedinject.AssistedInject; import com.thoughtworks.xstream.annotations.XStreamAlias; -import org.bytedeco.javacpp.opencv_objdetect.CascadeClassifier; +import org.bytedeco.opencv.opencv_objdetect.CascadeClassifier; import java.io.IOException; import java.nio.file.Files; diff --git a/core/src/main/java/edu/wpi/grip/core/sources/GrabberService.java b/core/src/main/java/edu/wpi/grip/core/sources/GrabberService.java index 756dcd3253..4dc2354204 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/GrabberService.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/GrabberService.java @@ -5,10 +5,10 @@ import com.google.common.math.IntMath; import com.google.common.util.concurrent.AbstractExecutionThreadService; -import org.bytedeco.javacpp.opencv_core; import org.bytedeco.javacv.Frame; import org.bytedeco.javacv.FrameGrabber; import org.bytedeco.javacv.OpenCVFrameConverter; +import org.bytedeco.opencv.opencv_core.Mat; import java.io.IOException; import java.math.RoundingMode; @@ -75,7 +75,7 @@ final void runOneGrab(final OpenCVFrameConverter.ToMat convertToMat, final Stopw throw new GrabberServiceException("Failed to grab image", ex); } - final opencv_core.Mat frameMat = convertToMat.convert(videoFrame); + final Mat frameMat = convertToMat.convert(videoFrame); if (frameMat == null || frameMat.isNull()) { throw new GrabberServiceException("Returned a null frame Mat"); diff --git a/core/src/main/java/edu/wpi/grip/core/sources/HttpImageHandler.java b/core/src/main/java/edu/wpi/grip/core/sources/HttpImageHandler.java index 4f44eefe1d..a9739b193e 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/HttpImageHandler.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/HttpImageHandler.java @@ -5,7 +5,7 @@ import edu.wpi.grip.core.http.PedanticHandler; import org.apache.commons.io.IOUtils; -import org.bytedeco.javacpp.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Mat; import org.eclipse.jetty.server.Request; import java.io.IOException; @@ -26,8 +26,8 @@ import static javax.servlet.http.HttpServletResponse.SC_METHOD_NOT_ALLOWED; /** - * Jetty handler for incoming images to be used by {@link HttpSource}. - * Only one instance of this class can exist for a context. + * Jetty handler for incoming images to be used by {@link HttpSource}. Only one instance of this + * class can exist for a context. * *

This handler will return one of the following status codes to a request on * {@code /GRIP/upload/image}: @@ -115,8 +115,8 @@ public void addCallback(Consumer callback) { /** * Removes the given callback from this handler. The callback will no longer be called when a new - * image is POSTed to {@code /GRIP/upload/image}, unless it is re-added with - * {@link #addCallback(Consumer)}. Does nothing if {@code callback} is {@code null}. + * image is POSTed to {@code /GRIP/upload/image}, unless it is re-added with {@link + * #addCallback(Consumer)}. Does nothing if {@code callback} is {@code null}. * * @param callback the callback to remove * @see #addCallback(Consumer) diff --git a/core/src/main/java/edu/wpi/grip/core/sources/HttpSource.java b/core/src/main/java/edu/wpi/grip/core/sources/HttpSource.java index c9663dc70a..6d969d9757 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/HttpSource.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/HttpSource.java @@ -1,4 +1,3 @@ - package edu.wpi.grip.core.sources; import edu.wpi.grip.core.MatWrapper; @@ -19,7 +18,7 @@ import com.google.inject.assistedinject.AssistedInject; import com.thoughtworks.xstream.annotations.XStreamAlias; -import org.bytedeco.javacpp.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Mat; import java.util.HashMap; import java.util.List; @@ -27,15 +26,15 @@ import java.util.Properties; import java.util.function.Consumer; -import static org.bytedeco.javacpp.opencv_imgcodecs.CV_LOAD_IMAGE_COLOR; -import static org.bytedeco.javacpp.opencv_imgcodecs.imdecode; +import static org.bytedeco.opencv.global.opencv_imgcodecs.IMREAD_COLOR; +import static org.bytedeco.opencv.global.opencv_imgcodecs.imdecode; /** - * Provides a way to generate a {@link Mat Mat} from an image that has been POSTed to the - * internal HTTP server. + * Provides a way to generate a {@link Mat Mat} from an image that has been POSTed to the internal + * HTTP server. *

- * Note that multiple {@link HttpSource HttpSources} will all supply the same image - * (or, more precisely, the same reference to a single image). + * Note that multiple {@link HttpSource HttpSources} will all supply the same image (or, more + * precisely, the same reference to a single image). *

*/ @XStreamAlias("grip:HttpImage") @@ -124,7 +123,7 @@ protected boolean updateOutputSockets() { // No data, don't bother converting return false; } - imageOutput.getValue().get().set(imdecode(image.getCpu(), CV_LOAD_IMAGE_COLOR)); + imageOutput.getValue().get().set(imdecode(image.getCpu(), IMREAD_COLOR)); imageOutput.flagChanged(); return true; } diff --git a/core/src/main/java/edu/wpi/grip/core/sources/IPCameraFrameGrabber.java b/core/src/main/java/edu/wpi/grip/core/sources/IPCameraFrameGrabber.java index ebd160fef7..4585816f81 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/IPCameraFrameGrabber.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/IPCameraFrameGrabber.java @@ -29,6 +29,8 @@ import org.bytedeco.javacv.FrameConverter; import org.bytedeco.javacv.FrameGrabber; import org.bytedeco.javacv.OpenCVFrameConverter; +import org.bytedeco.opencv.opencv_core.IplImage; +import org.bytedeco.opencv.opencv_core.Mat; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; @@ -42,12 +44,8 @@ import javax.imageio.ImageIO; -import static org.bytedeco.javacpp.opencv_core.CV_8UC1; -import static org.bytedeco.javacpp.opencv_core.CvMat; -import static org.bytedeco.javacpp.opencv_core.IplImage; -import static org.bytedeco.javacpp.opencv_core.cvMat; -import static org.bytedeco.javacpp.opencv_core.cvReleaseImage; -import static org.bytedeco.javacpp.opencv_imgcodecs.cvDecodeImage; +import static org.bytedeco.opencv.global.opencv_core.CV_8UC1; +import static org.bytedeco.opencv.global.opencv_core.cvReleaseImage; // This is here because FrameGrabber has an exception called Exception which triggers PMD @SuppressWarnings({"PMD.AvoidThrowingRawExceptionTypes", "all"}) @@ -67,7 +65,8 @@ public class IPCameraFrameGrabber extends FrameGrabber { private DataInputStream input; private byte[] pixelBuffer = new byte[1024]; private IplImage decoded = null; - private FrameConverter converter = new OpenCVFrameConverter.ToIplImage(); + private FrameConverter converter = new OpenCVFrameConverter.ToMat(); + public IPCameraFrameGrabber(String urlstr, int connectionTimeout, int readTimeout, TimeUnit unit) throws MalformedURLException { super(); @@ -82,7 +81,7 @@ public static void tryLoad() throws Exception { throw loadingException; } else { try { - Loader.load(org.bytedeco.javacpp.opencv_highgui.class); + Loader.load(org.bytedeco.opencv.global.opencv_highgui.class); } catch (Throwable t) { throw loadingException = new Exception("Failed to load " + IPCameraFrameGrabber.class, t); } @@ -129,15 +128,17 @@ public void trigger() throws Exception { @Override public Frame grab() throws Exception { + Mat mat = new Mat(); try { byte[] b = readImage(); - CvMat mat = cvMat(1, b.length, CV_8UC1, new BytePointer(b)); - if (decoded != null) { - cvReleaseImage(decoded); - } - return converter.convert(decoded = cvDecodeImage(mat)); + mat = new Mat(1, b.length, CV_8UC1); + mat.put(new BytePointer(b)); + Frame frame = converter.convert(mat); + return frame; } catch (IOException e) { throw new Exception(e.getMessage(), e); + } finally { + mat.release(); } } @@ -161,7 +162,6 @@ byte[] readImage() throws IOException { sb.append((char) input.read()); // '10' break; // done with subheader } - } } } diff --git a/core/src/main/java/edu/wpi/grip/core/sources/ImageFileSource.java b/core/src/main/java/edu/wpi/grip/core/sources/ImageFileSource.java index aa297be305..54715be821 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/ImageFileSource.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/ImageFileSource.java @@ -15,8 +15,8 @@ import com.google.inject.assistedinject.AssistedInject; import com.thoughtworks.xstream.annotations.XStreamAlias; -import org.bytedeco.javacpp.opencv_core.Mat; -import org.bytedeco.javacpp.opencv_imgcodecs; +import org.bytedeco.opencv.global.opencv_imgcodecs; +import org.bytedeco.opencv.opencv_core.Mat; import java.io.File; import java.io.IOException; diff --git a/core/src/main/java/edu/wpi/grip/core/sources/JavaCvSink.java b/core/src/main/java/edu/wpi/grip/core/sources/JavaCvSink.java index 6454f9cd27..597babe967 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/JavaCvSink.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/JavaCvSink.java @@ -6,15 +6,16 @@ import edu.wpi.cscore.VideoMode; import edu.wpi.cscore.VideoMode.PixelFormat; import edu.wpi.cscore.raw.RawFrame; + import org.bytedeco.javacpp.BytePointer; -import org.bytedeco.javacpp.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Mat; import java.nio.ByteBuffer; import static com.google.common.base.Preconditions.checkNotNull; -import static org.bytedeco.javacpp.opencv_core.CV_8UC1; -import static org.bytedeco.javacpp.opencv_core.CV_8UC2; -import static org.bytedeco.javacpp.opencv_core.CV_8UC3; +import static org.bytedeco.opencv.global.opencv_core.CV_8UC1; +import static org.bytedeco.opencv.global.opencv_core.CV_8UC2; +import static org.bytedeco.opencv.global.opencv_core.CV_8UC3; @SuppressFBWarnings("EQ_DOESNT_OVERRIDE_EQUALS") public class JavaCvSink extends ImageSink { @@ -52,9 +53,8 @@ public void close() { } /** - * Create a sink for accepting OpenCV images. - * WaitForFrame() must be called on the created sink to get each new - * image. + * Create a sink for accepting OpenCV images. WaitForFrame() must be called on the created sink to + * get each new image. * * @param name Source name (arbitrary unique identifier) */ @@ -63,24 +63,21 @@ public JavaCvSink(String name) { } /** - * Wait for the next frame and get the image. - * Times out (returning 0) after 0.225 seconds. - * The provided image will have three 3-bit channels stored in BGR order. + * Wait for the next frame and get the image. Times out (returning 0) after 0.225 seconds. The + * provided image will have three 3-bit channels stored in BGR order. * - * @return Frame time, or 0 on error (call GetError() to obtain the error - * message) + * @return Frame time, or 0 on error (call GetError() to obtain the error message) */ public long grabFrame(Mat image) { return grabFrame(image, 0.225); } /** - * Wait for the next frame and get the image. - * Times out (returning 0) after timeout seconds. - * The provided image will have three 3-bit channels stored in BGR order. + * Wait for the next frame and get the image. Times out (returning 0) after timeout seconds. The + * provided image will have three 3-bit channels stored in BGR order. * - * @return Frame time, or 0 on error (call GetError() to obtain the error - * message); the frame time is in 1 us increments. + * @return Frame time, or 0 on error (call GetError() to obtain the error message); the frame time + * is in 1 us increments. */ public long grabFrame(Mat image, double timeout) { checkNotNull(image, "Image cannot be null"); @@ -99,8 +96,8 @@ public long grabFrame(Mat image, double timeout) { width = frame.getWidth(); pixelFormat = frame.getPixelFormat(); tmpMat = new Mat(frame.getHeight(), frame.getWidth(), - getCVFormat(VideoMode.getPixelFormatFromInt(pixelFormat)), - new BytePointer(origByteBuffer)); + getCVFormat(VideoMode.getPixelFormatFromInt(pixelFormat)), + new BytePointer(origByteBuffer)); } tmpMat.copyTo(image); return rv; diff --git a/core/src/main/java/edu/wpi/grip/core/sources/MultiImageFileSource.java b/core/src/main/java/edu/wpi/grip/core/sources/MultiImageFileSource.java index 5bd52fa48c..2c21162cf4 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/MultiImageFileSource.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/MultiImageFileSource.java @@ -17,7 +17,7 @@ import com.google.inject.assistedinject.AssistedInject; import com.thoughtworks.xstream.annotations.XStreamAlias; -import org.bytedeco.javacpp.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Mat; import java.io.File; import java.io.IOException; @@ -116,9 +116,7 @@ private static String getPathProperty(int index) { * paths. * * @param paths The paths of all of the images. - * * @return The list of Mats loaded from the file system. - * * @throws IOException if one of the images fails to load */ private static Mat[] createImagesArray(List paths) throws IOException { @@ -198,7 +196,6 @@ public Properties getProperties() { * remain within the bounds of the image array. * * @param delta the value to add to the index when getting the image - * * @return The matrix at the given index in the array. */ private Mat addIndexAndGetImageByOffset(final int delta) { diff --git a/core/src/main/java/edu/wpi/grip/core/sources/VideoFileSource.java b/core/src/main/java/edu/wpi/grip/core/sources/VideoFileSource.java index 4fa33157cb..57df82ff14 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/VideoFileSource.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/VideoFileSource.java @@ -19,11 +19,11 @@ import com.google.inject.assistedinject.AssistedInject; import com.thoughtworks.xstream.annotations.XStreamAlias; -import org.bytedeco.javacpp.opencv_core.Mat; import org.bytedeco.javacv.FFmpegFrameGrabber; import org.bytedeco.javacv.Frame; import org.bytedeco.javacv.FrameGrabber; import org.bytedeco.javacv.OpenCVFrameConverter; +import org.bytedeco.opencv.opencv_core.Mat; import java.io.File; import java.io.IOException; @@ -152,8 +152,8 @@ public void initialize() throws IOException { } /** - * Grabs the next frame from the video, or the first frame - * if the end of the file has been reached. + * Grabs the next frame from the video, or the first frame if the end of the file has been + * reached. */ private void grabNextFrame() { try { @@ -191,8 +191,8 @@ public Observable currentFrameProperty() { } /** - * Gets the number of frames in the video file. This is a best guess and may not - * always be accurate. + * Gets the number of frames in the video file. This is a best guess and may not always be + * accurate. */ public int getFrameCount() { return frameCount; @@ -200,11 +200,10 @@ public int getFrameCount() { /** * Sets the frame grabber to the given frame number. This will pause frame grabber from reading - * successive frames; it can be resumed with {@link #resume()}. This runs asynchronously and - * will complete at some point in the future after this method is called. + * successive frames; it can be resumed with {@link #resume()}. This runs asynchronously and will + * complete at some point in the future after this method is called. * * @param frameNumber the number of the frame to grab - * * @throws IllegalArgumentException if {@code frameNumber} is negative or exceeds the number of * frames in the video file */ diff --git a/core/src/main/java/edu/wpi/grip/core/util/ImageLoadingUtility.java b/core/src/main/java/edu/wpi/grip/core/util/ImageLoadingUtility.java index b8191ad451..162d48bd0c 100644 --- a/core/src/main/java/edu/wpi/grip/core/util/ImageLoadingUtility.java +++ b/core/src/main/java/edu/wpi/grip/core/util/ImageLoadingUtility.java @@ -1,8 +1,8 @@ package edu.wpi.grip.core.util; -import org.bytedeco.javacpp.opencv_core.Mat; -import org.bytedeco.javacpp.opencv_imgcodecs; +import org.bytedeco.opencv.global.opencv_imgcodecs; +import org.bytedeco.opencv.opencv_core.Mat; import java.io.IOException; diff --git a/core/src/main/java/edu/wpi/grip/core/util/MetaInfReader.java b/core/src/main/java/edu/wpi/grip/core/util/MetaInfReader.java index d63ed54154..e3a456add0 100644 --- a/core/src/main/java/edu/wpi/grip/core/util/MetaInfReader.java +++ b/core/src/main/java/edu/wpi/grip/core/util/MetaInfReader.java @@ -27,11 +27,9 @@ private MetaInfReader() { * Reads all classes from the appropriate registry file. * * @param fileName the name of the file, relative to the META-INF directory - * @param the type of the class (eg - * {@code Operation} for a registry of operation implementations) - * + * @param the type of the class (eg {@code Operation} for a registry of operation + * implementations) * @return a stream of the classes in the registry file - * * @throws IOException if the file could not be read */ public static Stream> readClasses(String fileName) throws IOException { @@ -45,10 +43,8 @@ public static Stream> readClasses(String fileName) throws IOExcepti * Read all lines from a file located at {@code /META-INF/$fileName}. * * @param fileName the name of the file, relative to the META-INF directory - * - * @throws IOException if no file exists with the given name, or if the file exists but cannot - * be read - * + * @throws IOException if no file exists with the given name, or if the file exists but cannot be + * read * @see #readLines(InputStream) */ public static Stream readLines(String fileName) throws IOException { @@ -62,13 +58,11 @@ public static Stream readLines(String fileName) throws IOException { /** * Reads all lines from an input stream. Comments are supported by starting with the {@code #} - * character; everything after will be ignored. Empty lines and lines consisting of just a - * comment are ignored. Whitespace at the start and end of each line wil be removed. + * character; everything after will be ignored. Empty lines and lines consisting of just a comment + * are ignored. Whitespace at the start and end of each line wil be removed. * * @param inputStream the input stream to read lines from - * * @return a stream of the filtered lines - * * @throws IOException if the stream could not be read from or safely closed */ @VisibleForTesting @@ -96,12 +90,11 @@ static Class classForNameOrNull(String name) { } /** - * Strips a comment from a line. Comments are the section of the string after and including - * the first '#' character in the line. Whitespace before that character will not be removed. - * If a line does not contain a comment, it is returned with no modification. + * Strips a comment from a line. Comments are the section of the string after and including the + * first '#' character in the line. Whitespace before that character will not be removed. If a + * line does not contain a comment, it is returned with no modification. * * @param line the line to strip a comment from - * * @return the stripped line */ @VisibleForTesting diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/BorderTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/BorderTypesEnum.java index 9ccefea712..046a610bd6 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/BorderTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/BorderTypesEnum.java @@ -1,23 +1,49 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum BorderTypesEnum { - /** `iiiiii|abcdefgh|iiiiiii` with some specified `i` */ - BORDER_CONSTANT(opencv_core.BORDER_CONSTANT), /** `aaaaaa|abcdefgh|hhhhhhh` */ - BORDER_REPLICATE(opencv_core.BORDER_REPLICATE), /** `fedcba|abcdefgh|hgfedcb` */ - BORDER_REFLECT(opencv_core.BORDER_REFLECT), /** `cdefgh|abcdefgh|abcdefg` */ - BORDER_WRAP(opencv_core.BORDER_WRAP), /** `gfedcb|abcdefgh|gfedcba` */ - BORDER_REFLECT_101(opencv_core.BORDER_REFLECT_101), /** `uvwxyz|absdefgh|ijklmno` */ - BORDER_TRANSPARENT(opencv_core.BORDER_TRANSPARENT), /** same as BORDER_REFLECT_101 */ - BORDER_REFLECT101(opencv_core.BORDER_REFLECT101), /** same as BORDER_REFLECT_101 */ - BORDER_DEFAULT(opencv_core.BORDER_DEFAULT), /** do not look outside of ROI */ - BORDER_ISOLATED(opencv_core.BORDER_ISOLATED); + /** + * `iiiiii|abcdefgh|iiiiiii` with some specified `i` + */ + BORDER_CONSTANT(opencv_core.BORDER_CONSTANT), + /** + * `aaaaaa|abcdefgh|hhhhhhh` + */ + BORDER_REPLICATE(opencv_core.BORDER_REPLICATE), + /** + * `fedcba|abcdefgh|hgfedcb` + */ + BORDER_REFLECT(opencv_core.BORDER_REFLECT), + /** + * `cdefgh|abcdefgh|abcdefg` + */ + BORDER_WRAP(opencv_core.BORDER_WRAP), + /** + * `gfedcb|abcdefgh|gfedcba` + */ + BORDER_REFLECT_101(opencv_core.BORDER_REFLECT_101), + /** + * `uvwxyz|absdefgh|ijklmno` + */ + BORDER_TRANSPARENT(opencv_core.BORDER_TRANSPARENT), + /** + * same as BORDER_REFLECT_101 + */ + BORDER_REFLECT101(opencv_core.BORDER_REFLECT101), + /** + * same as BORDER_REFLECT_101 + */ + BORDER_DEFAULT(opencv_core.BORDER_DEFAULT), + /** + * do not look outside of ROI + */ + BORDER_ISOLATED(opencv_core.BORDER_ISOLATED); - public final int value; + public final int value; - BorderTypesEnum(int value) { - this.value = value; - } + BorderTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CmpTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CmpTypesEnum.java index 9486c3e581..52ba3b008d 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CmpTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CmpTypesEnum.java @@ -1,20 +1,37 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum CmpTypesEnum { - /** src1 is equal to src2. */ - CMP_EQ(opencv_core.CMP_EQ), /** src1 is greater than src2. */ - CMP_GT(opencv_core.CMP_GT), /** src1 is greater than or equal to src2. */ - CMP_GE(opencv_core.CMP_GE), /** src1 is less than src2. */ - CMP_LT(opencv_core.CMP_LT), /** src1 is less than or equal to src2. */ - CMP_LE(opencv_core.CMP_LE), /** src1 is unequal to src2. */ - CMP_NE(opencv_core.CMP_NE); + /** + * src1 is equal to src2. + */ + CMP_EQ(opencv_core.CMP_EQ), + /** + * src1 is greater than src2. + */ + CMP_GT(opencv_core.CMP_GT), + /** + * src1 is greater than or equal to src2. + */ + CMP_GE(opencv_core.CMP_GE), + /** + * src1 is less than src2. + */ + CMP_LT(opencv_core.CMP_LT), + /** + * src1 is less than or equal to src2. + */ + CMP_LE(opencv_core.CMP_LE), + /** + * src1 is unequal to src2. + */ + CMP_NE(opencv_core.CMP_NE); - public final int value; + public final int value; - CmpTypesEnum(int value) { - this.value = value; - } + CmpTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CovarFlagsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CovarFlagsEnum.java index 3277f3867a..e9cd14402b 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CovarFlagsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CovarFlagsEnum.java @@ -1,40 +1,56 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum CovarFlagsEnum { - /** The output covariance matrix is calculated as: - \f[\texttt{scale} \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...],\f] - The covariance matrix will be nsamples x nsamples. Such an unusual covariance matrix is used - for fast PCA of a set of very large vectors (see, for example, the EigenFaces technique for - face recognition). Eigenvalues of this "scrambled" matrix match the eigenvalues of the true - covariance matrix. The "true" eigenvectors can be easily calculated from the eigenvectors of - the "scrambled" covariance matrix. */ - COVAR_SCRAMBLED(opencv_core.COVAR_SCRAMBLED), /**The output covariance matrix is calculated as: - \f[\texttt{scale} \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...] \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T,\f] - covar will be a square matrix of the same size as the total number of elements in each input - vector. One and only one of COVAR_SCRAMBLED and COVAR_NORMAL must be specified.*/ - COVAR_NORMAL(opencv_core.COVAR_NORMAL), /** If the flag is specified, the function does not calculate mean from - the input vectors but, instead, uses the passed mean vector. This is useful if mean has been - pre-calculated or known in advance, or if the covariance matrix is calculated by parts. In - this case, mean is not a mean vector of the input sub-set of vectors but rather the mean - vector of the whole set.*/ - COVAR_USE_AVG(opencv_core.COVAR_USE_AVG), /** If the flag is specified, the covariance matrix is scaled. In the - "normal" mode, scale is 1./nsamples . In the "scrambled" mode, scale is the reciprocal of the - total number of elements in each input vector. By default (if the flag is not specified), the - covariance matrix is not scaled ( scale=1 ).*/ - COVAR_SCALE(opencv_core.COVAR_SCALE), /** If the flag is - specified, all the input vectors are stored as rows of the samples matrix. mean should be a - single-row vector in this case.*/ - COVAR_ROWS(opencv_core.COVAR_ROWS), /** If the flag is - specified, all the input vectors are stored as columns of the samples matrix. mean should be a - single-column vector in this case.*/ - COVAR_COLS(opencv_core.COVAR_COLS); + /** + * The output covariance matrix is calculated as: \f[\texttt{scale} \cdot [ \texttt{vects} + * [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T \cdot [ \texttt{vects} + * [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...],\f] The covariance matrix will + * be nsamples x nsamples. Such an unusual covariance matrix is used for fast PCA of a set of very + * large vectors (see, for example, the EigenFaces technique for face recognition). Eigenvalues of + * this "scrambled" matrix match the eigenvalues of the true covariance matrix. The "true" + * eigenvectors can be easily calculated from the eigenvectors of the "scrambled" covariance + * matrix. + */ + COVAR_SCRAMBLED(opencv_core.COVAR_SCRAMBLED), + /** + * The output covariance matrix is calculated as: \f[\texttt{scale} \cdot [ \texttt{vects} + * [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...] \cdot [ \texttt{vects} + * [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T,\f] covar will be a square + * matrix of the same size as the total number of elements in each input vector. One and only one + * of COVAR_SCRAMBLED and COVAR_NORMAL must be specified. + */ + COVAR_NORMAL(opencv_core.COVAR_NORMAL), + /** + * If the flag is specified, the function does not calculate mean from the input vectors but, + * instead, uses the passed mean vector. This is useful if mean has been pre-calculated or known + * in advance, or if the covariance matrix is calculated by parts. In this case, mean is not a + * mean vector of the input sub-set of vectors but rather the mean vector of the whole set. + */ + COVAR_USE_AVG(opencv_core.COVAR_USE_AVG), + /** + * If the flag is specified, the covariance matrix is scaled. In the "normal" mode, scale is + * 1./nsamples . In the "scrambled" mode, scale is the reciprocal of the total number of elements + * in each input vector. By default (if the flag is not specified), the covariance matrix is not + * scaled ( scale=1 ). + */ + COVAR_SCALE(opencv_core.COVAR_SCALE), + /** + * If the flag is specified, all the input vectors are stored as rows of the samples matrix. mean + * should be a single-row vector in this case. + */ + COVAR_ROWS(opencv_core.COVAR_ROWS), + /** + * If the flag is specified, all the input vectors are stored as columns of the samples matrix. + * mean should be a single-column vector in this case. + */ + COVAR_COLS(opencv_core.COVAR_COLS); - public final int value; + public final int value; - CovarFlagsEnum(int value) { - this.value = value; - } + CovarFlagsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CpuFeaturesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CpuFeaturesEnum.java index 03fbf08485..608d20943f 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CpuFeaturesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/CpuFeaturesEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum CpuFeaturesEnum { - CPU_MMX(opencv_core.CPU_MMX), CPU_SSE(opencv_core.CPU_SSE), CPU_SSE2(opencv_core.CPU_SSE2), CPU_SSE3(opencv_core.CPU_SSE3), CPU_SSSE3(opencv_core.CPU_SSSE3), CPU_SSE4_1(opencv_core.CPU_SSE4_1), CPU_SSE4_2(opencv_core.CPU_SSE4_2), CPU_POPCNT(opencv_core.CPU_POPCNT), CPU_AVX(opencv_core.CPU_AVX), CPU_AVX2(opencv_core.CPU_AVX2), CPU_FMA3(opencv_core.CPU_FMA3), CPU_AVX_512F(opencv_core.CPU_AVX_512F), CPU_AVX_512BW(opencv_core.CPU_AVX_512BW), CPU_AVX_512CD(opencv_core.CPU_AVX_512CD), CPU_AVX_512DQ(opencv_core.CPU_AVX_512DQ), CPU_AVX_512ER(opencv_core.CPU_AVX_512ER), CPU_AVX_512IFMA512(opencv_core.CPU_AVX_512IFMA512), CPU_AVX_512PF(opencv_core.CPU_AVX_512PF), CPU_AVX_512VBMI(opencv_core.CPU_AVX_512VBMI), CPU_AVX_512VL(opencv_core.CPU_AVX_512VL), CPU_NEON(opencv_core.CPU_NEON); + CPU_MMX(opencv_core.CPU_MMX), CPU_SSE(opencv_core.CPU_SSE), CPU_SSE2(opencv_core.CPU_SSE2), CPU_SSE3(opencv_core.CPU_SSE3), CPU_SSSE3(opencv_core.CPU_SSSE3), CPU_SSE4_1(opencv_core.CPU_SSE4_1), CPU_SSE4_2(opencv_core.CPU_SSE4_2), CPU_POPCNT(opencv_core.CPU_POPCNT), CPU_AVX(opencv_core.CPU_AVX), CPU_AVX2(opencv_core.CPU_AVX2), CPU_FMA3(opencv_core.CPU_FMA3), CPU_AVX_512F(opencv_core.CPU_AVX_512F), CPU_AVX_512BW(opencv_core.CPU_AVX_512BW), CPU_AVX_512CD(opencv_core.CPU_AVX_512CD), CPU_AVX_512DQ(opencv_core.CPU_AVX_512DQ), CPU_AVX_512ER(opencv_core.CPU_AVX_512ER), CPU_AVX_512IFMA512(opencv_core.CPU_AVX_512IFMA512), CPU_AVX_512PF(opencv_core.CPU_AVX_512PF), CPU_AVX_512VBMI(opencv_core.CPU_AVX_512VBMI), CPU_AVX_512VL(opencv_core.CPU_AVX_512VL), CPU_NEON(opencv_core.CPU_NEON); - public final int value; + public final int value; - CpuFeaturesEnum(int value) { - this.value = value; - } + CpuFeaturesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/DecompTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/DecompTypesEnum.java index 9c8c1d9bf6..709c6c7e80 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/DecompTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/DecompTypesEnum.java @@ -1,26 +1,40 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum DecompTypesEnum { - /** Gaussian elimination with the optimal pivot element chosen. */ - DECOMP_LU(opencv_core.DECOMP_LU), /** singular value decomposition (SVD) method; the system can be over-defined and/or the matrix - src1 can be singular */ - DECOMP_SVD(opencv_core.DECOMP_SVD), /** eigenvalue decomposition; the matrix src1 must be symmetrical */ - DECOMP_EIG(opencv_core.DECOMP_EIG), /** Cholesky \f$LL^T\f$ factorization; the matrix src1 must be symmetrical and positively - defined */ - DECOMP_CHOLESKY(opencv_core.DECOMP_CHOLESKY), /** QR factorization; the system can be over-defined and/or the matrix src1 can be singular */ - DECOMP_QR(opencv_core.DECOMP_QR), /** while all the previous flags are mutually exclusive, this flag can be used together with - any of the previous; it means that the normal equations - \f$\texttt{src1}^T\cdot\texttt{src1}\cdot\texttt{dst}=\texttt{src1}^T\texttt{src2}\f$ are - solved instead of the original system - \f$\texttt{src1}\cdot\texttt{dst}=\texttt{src2}\f$ */ - DECOMP_NORMAL(opencv_core.DECOMP_NORMAL); + /** + * Gaussian elimination with the optimal pivot element chosen. + */ + DECOMP_LU(opencv_core.DECOMP_LU), + /** + * singular value decomposition (SVD) method; the system can be over-defined and/or the matrix + * src1 can be singular + */ + DECOMP_SVD(opencv_core.DECOMP_SVD), + /** + * eigenvalue decomposition; the matrix src1 must be symmetrical + */ + DECOMP_EIG(opencv_core.DECOMP_EIG), + /** + * Cholesky \f$LL^T\f$ factorization; the matrix src1 must be symmetrical and positively defined + */ + DECOMP_CHOLESKY(opencv_core.DECOMP_CHOLESKY), + /** + * QR factorization; the system can be over-defined and/or the matrix src1 can be singular + */ + DECOMP_QR(opencv_core.DECOMP_QR), + /** + * while all the previous flags are mutually exclusive, this flag can be used together with any of + * the previous; it means that the normal equations \f$\texttt{src1}^T\cdot\texttt{src1}\cdot\texttt{dst}=\texttt{src1}^T\texttt{src2}\f$ + * are solved instead of the original system \f$\texttt{src1}\cdot\texttt{dst}=\texttt{src2}\f$ + */ + DECOMP_NORMAL(opencv_core.DECOMP_NORMAL); - public final int value; + public final int value; - DecompTypesEnum(int value) { - this.value = value; - } + DecompTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/DftFlagsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/DftFlagsEnum.java index dff7e63427..1dedb30dd0 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/DftFlagsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/DftFlagsEnum.java @@ -1,41 +1,60 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum DftFlagsEnum { - /** performs an inverse 1D or 2D transform instead of the default forward - transform. */ - DFT_INVERSE(opencv_core.DFT_INVERSE), /** scales the result: divide it by the number of array elements. Normally, it is - combined with DFT_INVERSE. */ - DFT_SCALE(opencv_core.DFT_SCALE), /** performs a forward or inverse transform of every individual row of the input - matrix; this flag enables you to transform multiple vectors simultaneously and can be used to - decrease the overhead (which is sometimes several times larger than the processing itself) to - perform 3D and higher-dimensional transformations and so forth.*/ - DFT_ROWS(opencv_core.DFT_ROWS), /** performs a forward transformation of 1D or 2D real array; the result, - though being a complex array, has complex-conjugate symmetry (*CCS*, see the function - description below for details), and such an array can be packed into a real array of the same - size as input, which is the fastest option and which is what the function does by default; - however, you may wish to get a full complex array (for simpler spectrum analysis, and so on) - - pass the flag to enable the function to produce a full-size complex output array. */ - DFT_COMPLEX_OUTPUT(opencv_core.DFT_COMPLEX_OUTPUT), /** performs an inverse transformation of a 1D or 2D complex array; the - result is normally a complex array of the same size, however, if the input array has - conjugate-complex symmetry (for example, it is a result of forward transformation with - DFT_COMPLEX_OUTPUT flag), the output is a real array; while the function itself does not - check whether the input is symmetrical or not, you can pass the flag and then the function - will assume the symmetry and produce the real output array (note that when the input is packed - into a real array and inverse transformation is executed, the function treats the input as a - packed complex-conjugate symmetrical array, and the output will also be a real array). */ - DFT_REAL_OUTPUT(opencv_core.DFT_REAL_OUTPUT), /** performs an inverse 1D or 2D transform instead of the default forward transform. */ - DCT_INVERSE(opencv_core.DCT_INVERSE), /** performs a forward or inverse transform of every individual row of the input - matrix. This flag enables you to transform multiple vectors simultaneously and can be used to - decrease the overhead (which is sometimes several times larger than the processing itself) to - perform 3D and higher-dimensional transforms and so forth.*/ - DCT_ROWS(opencv_core.DCT_ROWS); + /** + * performs an inverse 1D or 2D transform instead of the default forward transform. + */ + DFT_INVERSE(opencv_core.DFT_INVERSE), + /** + * scales the result: divide it by the number of array elements. Normally, it is combined with + * DFT_INVERSE. + */ + DFT_SCALE(opencv_core.DFT_SCALE), + /** + * performs a forward or inverse transform of every individual row of the input matrix; this flag + * enables you to transform multiple vectors simultaneously and can be used to decrease the + * overhead (which is sometimes several times larger than the processing itself) to perform 3D and + * higher-dimensional transformations and so forth. + */ + DFT_ROWS(opencv_core.DFT_ROWS), + /** + * performs a forward transformation of 1D or 2D real array; the result, though being a complex + * array, has complex-conjugate symmetry (*CCS*, see the function description below for details), + * and such an array can be packed into a real array of the same size as input, which is the + * fastest option and which is what the function does by default; however, you may wish to get a + * full complex array (for simpler spectrum analysis, and so on) - pass the flag to enable the + * function to produce a full-size complex output array. + */ + DFT_COMPLEX_OUTPUT(opencv_core.DFT_COMPLEX_OUTPUT), + /** + * performs an inverse transformation of a 1D or 2D complex array; the result is normally a + * complex array of the same size, however, if the input array has conjugate-complex symmetry (for + * example, it is a result of forward transformation with DFT_COMPLEX_OUTPUT flag), the output is + * a real array; while the function itself does not check whether the input is symmetrical or not, + * you can pass the flag and then the function will assume the symmetry and produce the real + * output array (note that when the input is packed into a real array and inverse transformation + * is executed, the function treats the input as a packed complex-conjugate symmetrical array, and + * the output will also be a real array). + */ + DFT_REAL_OUTPUT(opencv_core.DFT_REAL_OUTPUT), + /** + * performs an inverse 1D or 2D transform instead of the default forward transform. + */ + DCT_INVERSE(opencv_core.DCT_INVERSE), + /** + * performs a forward or inverse transform of every individual row of the input matrix. This flag + * enables you to transform multiple vectors simultaneously and can be used to decrease the + * overhead (which is sometimes several times larger than the processing itself) to perform 3D and + * higher-dimensional transforms and so forth. + */ + DCT_ROWS(opencv_core.DCT_ROWS); - public final int value; + public final int value; - DftFlagsEnum(int value) { - this.value = value; - } + DftFlagsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/Enum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/Enum.java index 373fdefb05..840fcc956a 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/Enum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/Enum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum Enum { - ACCESS_READ(opencv_core.ACCESS_READ), ACCESS_WRITE(opencv_core.ACCESS_WRITE), ACCESS_RW(opencv_core.ACCESS_RW), ACCESS_MASK(opencv_core.ACCESS_MASK), ACCESS_FAST(opencv_core.ACCESS_FAST); + ACCESS_READ(opencv_core.ACCESS_READ), ACCESS_WRITE(opencv_core.ACCESS_WRITE), ACCESS_RW(opencv_core.ACCESS_RW), ACCESS_MASK(opencv_core.ACCESS_MASK), ACCESS_FAST(opencv_core.ACCESS_FAST); - public final int value; + public final int value; - Enum(int value) { - this.value = value; - } + Enum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/ErrorCodeEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/ErrorCodeEnum.java index f234e8b05d..88449fb551 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/ErrorCodeEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/ErrorCodeEnum.java @@ -1,46 +1,141 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum ErrorCodeEnum { - /** everithing is ok */ - StsOk(opencv_core.StsOk), /** pseudo error for back trace */ - StsBackTrace(opencv_core.StsBackTrace), /** unknown /unspecified error */ - StsError(opencv_core.StsError), /** internal error (bad state) */ - StsInternal(opencv_core.StsInternal), /** insufficient memory */ - StsNoMem(opencv_core.StsNoMem), /** function arg/param is bad */ - StsBadArg(opencv_core.StsBadArg), /** unsupported function */ - StsBadFunc(opencv_core.StsBadFunc), /** iter. didn't converge */ - StsNoConv(opencv_core.StsNoConv), /** tracing */ - StsAutoTrace(opencv_core.StsAutoTrace), /** image header is NULL */ - HeaderIsNull(opencv_core.HeaderIsNull), /** image size is invalid */ - BadImageSize(opencv_core.BadImageSize), /** offset is invalid */ - BadOffset(opencv_core.BadOffset), BadDataPtr(opencv_core.BadDataPtr), BadStep(opencv_core.BadStep), BadModelOrChSeq(opencv_core.BadModelOrChSeq), BadNumChannels(opencv_core.BadNumChannels), BadNumChannel1U(opencv_core.BadNumChannel1U), BadDepth(opencv_core.BadDepth), BadAlphaChannel(opencv_core.BadAlphaChannel), BadOrder(opencv_core.BadOrder), BadOrigin(opencv_core.BadOrigin), BadAlign(opencv_core.BadAlign), BadCallBack(opencv_core.BadCallBack), BadTileSize(opencv_core.BadTileSize), BadCOI(opencv_core.BadCOI), BadROISize(opencv_core.BadROISize), MaskIsTiled(opencv_core.MaskIsTiled), /** null pointer */ - StsNullPtr(opencv_core.StsNullPtr), /** incorrect vector length */ - StsVecLengthErr(opencv_core.StsVecLengthErr), /** incorr. filter structure content */ - StsFilterStructContentErr(opencv_core.StsFilterStructContentErr), /** incorr. transform kernel content */ - StsKernelStructContentErr(opencv_core.StsKernelStructContentErr), /** incorrect filter ofset value */ - StsFilterOffsetErr(opencv_core.StsFilterOffsetErr), /** the input/output structure size is incorrect */ - StsBadSize(opencv_core.StsBadSize), /** division by zero */ - StsDivByZero(opencv_core.StsDivByZero), /** in-place operation is not supported */ - StsInplaceNotSupported(opencv_core.StsInplaceNotSupported), /** request can't be completed */ - StsObjectNotFound(opencv_core.StsObjectNotFound), /** formats of input/output arrays differ */ - StsUnmatchedFormats(opencv_core.StsUnmatchedFormats), /** flag is wrong or not supported */ - StsBadFlag(opencv_core.StsBadFlag), /** bad CvPoint */ - StsBadPoint(opencv_core.StsBadPoint), /** bad format of mask (neither 8uC1 nor 8sC1) */ - StsBadMask(opencv_core.StsBadMask), /** sizes of input/output structures do not match */ - StsUnmatchedSizes(opencv_core.StsUnmatchedSizes), /** the data format/type is not supported by the function */ - StsUnsupportedFormat(opencv_core.StsUnsupportedFormat), /** some of parameters are out of range */ - StsOutOfRange(opencv_core.StsOutOfRange), /** invalid syntax/structure of the parsed file */ - StsParseError(opencv_core.StsParseError), /** the requested function/feature is not implemented */ - StsNotImplemented(opencv_core.StsNotImplemented), /** an allocated block has been corrupted */ - StsBadMemBlock(opencv_core.StsBadMemBlock), /** assertion failed */ - StsAssert(opencv_core.StsAssert), GpuNotSupported(opencv_core.GpuNotSupported), GpuApiCallError(opencv_core.GpuApiCallError), OpenGlNotSupported(opencv_core.OpenGlNotSupported), OpenGlApiCallError(opencv_core.OpenGlApiCallError), OpenCLApiCallError(opencv_core.OpenCLApiCallError), OpenCLDoubleNotSupported(opencv_core.OpenCLDoubleNotSupported), OpenCLInitError(opencv_core.OpenCLInitError), OpenCLNoAMDBlasFft(opencv_core.OpenCLNoAMDBlasFft); + /** + * everithing is ok + */ + StsOk(opencv_core.StsOk), + /** + * pseudo error for back trace + */ + StsBackTrace(opencv_core.StsBackTrace), + /** + * unknown /unspecified error + */ + StsError(opencv_core.StsError), + /** + * internal error (bad state) + */ + StsInternal(opencv_core.StsInternal), + /** + * insufficient memory + */ + StsNoMem(opencv_core.StsNoMem), + /** + * function arg/param is bad + */ + StsBadArg(opencv_core.StsBadArg), + /** + * unsupported function + */ + StsBadFunc(opencv_core.StsBadFunc), + /** + * iter. didn't converge + */ + StsNoConv(opencv_core.StsNoConv), + /** + * tracing + */ + StsAutoTrace(opencv_core.StsAutoTrace), + /** + * image header is NULL + */ + HeaderIsNull(opencv_core.HeaderIsNull), + /** + * image size is invalid + */ + BadImageSize(opencv_core.BadImageSize), + /** + * offset is invalid + */ + BadOffset(opencv_core.BadOffset), BadDataPtr(opencv_core.BadDataPtr), BadStep(opencv_core.BadStep), BadModelOrChSeq(opencv_core.BadModelOrChSeq), BadNumChannels(opencv_core.BadNumChannels), BadNumChannel1U(opencv_core.BadNumChannel1U), BadDepth(opencv_core.BadDepth), BadAlphaChannel(opencv_core.BadAlphaChannel), BadOrder(opencv_core.BadOrder), BadOrigin(opencv_core.BadOrigin), BadAlign(opencv_core.BadAlign), BadCallBack(opencv_core.BadCallBack), BadTileSize(opencv_core.BadTileSize), BadCOI(opencv_core.BadCOI), BadROISize(opencv_core.BadROISize), MaskIsTiled(opencv_core.MaskIsTiled), + /** + * null pointer + */ + StsNullPtr(opencv_core.StsNullPtr), + /** + * incorrect vector length + */ + StsVecLengthErr(opencv_core.StsVecLengthErr), + /** + * incorr. filter structure content + */ + StsFilterStructContentErr(opencv_core.StsFilterStructContentErr), + /** + * incorr. transform kernel content + */ + StsKernelStructContentErr(opencv_core.StsKernelStructContentErr), + /** + * incorrect filter ofset value + */ + StsFilterOffsetErr(opencv_core.StsFilterOffsetErr), + /** + * the input/output structure size is incorrect + */ + StsBadSize(opencv_core.StsBadSize), + /** + * division by zero + */ + StsDivByZero(opencv_core.StsDivByZero), + /** + * in-place operation is not supported + */ + StsInplaceNotSupported(opencv_core.StsInplaceNotSupported), + /** + * request can't be completed + */ + StsObjectNotFound(opencv_core.StsObjectNotFound), + /** + * formats of input/output arrays differ + */ + StsUnmatchedFormats(opencv_core.StsUnmatchedFormats), + /** + * flag is wrong or not supported + */ + StsBadFlag(opencv_core.StsBadFlag), + /** + * bad CvPoint + */ + StsBadPoint(opencv_core.StsBadPoint), + /** + * bad format of mask (neither 8uC1 nor 8sC1) + */ + StsBadMask(opencv_core.StsBadMask), + /** + * sizes of input/output structures do not match + */ + StsUnmatchedSizes(opencv_core.StsUnmatchedSizes), + /** + * the data format/type is not supported by the function + */ + StsUnsupportedFormat(opencv_core.StsUnsupportedFormat), + /** + * some of parameters are out of range + */ + StsOutOfRange(opencv_core.StsOutOfRange), + /** + * invalid syntax/structure of the parsed file + */ + StsParseError(opencv_core.StsParseError), + /** + * the requested function/feature is not implemented + */ + StsNotImplemented(opencv_core.StsNotImplemented), + /** + * an allocated block has been corrupted + */ + StsBadMemBlock(opencv_core.StsBadMemBlock), + /** + * assertion failed + */ + StsAssert(opencv_core.StsAssert), GpuNotSupported(opencv_core.GpuNotSupported), GpuApiCallError(opencv_core.GpuApiCallError), OpenGlNotSupported(opencv_core.OpenGlNotSupported), OpenGlApiCallError(opencv_core.OpenGlApiCallError), OpenCLApiCallError(opencv_core.OpenCLApiCallError), OpenCLDoubleNotSupported(opencv_core.OpenCLDoubleNotSupported), OpenCLInitError(opencv_core.OpenCLInitError), OpenCLNoAMDBlasFft(opencv_core.OpenCLNoAMDBlasFft); - public final int value; + public final int value; - ErrorCodeEnum(int value) { - this.value = value; - } + ErrorCodeEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileNodeTypeEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileNodeTypeEnum.java index a075e0cc80..511edcf330 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileNodeTypeEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileNodeTypeEnum.java @@ -1,27 +1,63 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.FileNode; public enum FileNodeTypeEnum { - /** empty node */ - NONE(opencv_core.FileNode.NONE), /** an integer */ - INT(opencv_core.FileNode.INT), /** floating-point number */ - REAL(opencv_core.FileNode.REAL), /** synonym or REAL */ - FLOAT(opencv_core.FileNode.FLOAT), /** text string in UTF-8 encoding */ - STR(opencv_core.FileNode.STR), /** synonym for STR */ - STRING(opencv_core.FileNode.STRING), /** integer of size size_t. Typically used for storing complex dynamic structures where some elements reference the others */ - REF(opencv_core.FileNode.REF), /** sequence */ - SEQ(opencv_core.FileNode.SEQ), /** mapping */ - MAP(opencv_core.FileNode.MAP), TYPE_MASK(opencv_core.FileNode.TYPE_MASK), /** compact representation of a sequence or mapping. Used only by YAML writer */ - FLOW(opencv_core.FileNode.FLOW), /** a registered object (e.g. a matrix) */ - USER(opencv_core.FileNode.USER), /** empty structure (sequence or mapping) */ - EMPTY(opencv_core.FileNode.EMPTY), /** the node has a name (i.e. it is element of a mapping) */ - NAMED(opencv_core.FileNode.NAMED); + /** + * empty node + */ + NONE(FileNode.NONE), + /** + * an integer + */ + INT(FileNode.INT), + /** + * floating-point number + */ + REAL(FileNode.REAL), + /** + * synonym or REAL + */ + FLOAT(FileNode.FLOAT), + /** + * text string in UTF-8 encoding + */ + STR(FileNode.STR), + /** + * synonym for STR + */ + STRING(FileNode.STRING), + /** + * integer of size size_t. Typically used for storing complex dynamic structures where some + * elements reference the others + */ + SEQ(FileNode.SEQ), + /** + * mapping + */ + MAP(FileNode.MAP), + TYPE_MASK(FileNode.TYPE_MASK), + /** + * compact representation of a sequence or mapping. Used only by YAML writer + */ + FLOW(FileNode.FLOW), + /** + * a registered object (e.g. a matrix) + */ + USER(FileNode.UNIFORM), + /** + * empty structure (sequence or mapping) + */ + EMPTY(FileNode.EMPTY), + /** + * the node has a name (i.e. it is element of a mapping) + */ + NAMED(FileNode.NAMED); - public final int value; + public final int value; - FileNodeTypeEnum(int value) { - this.value = value; - } + FileNodeTypeEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileStorageEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileStorageEnum.java index a3ca885362..9086daae7d 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileStorageEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileStorageEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.FileStorage; public enum FileStorageEnum { - UNDEFINED(opencv_core.FileStorage.UNDEFINED), VALUE_EXPECTED(opencv_core.FileStorage.VALUE_EXPECTED), NAME_EXPECTED(opencv_core.FileStorage.NAME_EXPECTED), INSIDE_MAP(opencv_core.FileStorage.INSIDE_MAP); + UNDEFINED(FileStorage.UNDEFINED), VALUE_EXPECTED(FileStorage.VALUE_EXPECTED), NAME_EXPECTED(FileStorage.NAME_EXPECTED), INSIDE_MAP(FileStorage.INSIDE_MAP); - public final int value; + public final int value; - FileStorageEnum(int value) { - this.value = value; - } + FileStorageEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileStorageModeEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileStorageModeEnum.java index 393df8413c..6e1e9e0088 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileStorageModeEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FileStorageModeEnum.java @@ -1,23 +1,46 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.FileStorage; public enum FileStorageModeEnum { - /** value, open the file for reading */ - READ(opencv_core.FileStorage.READ), /** value, open the file for writing */ - WRITE(opencv_core.FileStorage.WRITE), /** value, open the file for appending */ - APPEND(opencv_core.FileStorage.APPEND), /** flag, read data from source or write data to the internal buffer (which is - * returned by FileStorage::release) */ - MEMORY(opencv_core.FileStorage.MEMORY), /** mask for format flags */ - FORMAT_MASK(opencv_core.FileStorage.FORMAT_MASK), /** flag, auto format */ - FORMAT_AUTO(opencv_core.FileStorage.FORMAT_AUTO), /** flag, XML format */ - FORMAT_XML(opencv_core.FileStorage.FORMAT_XML), /** flag, YAML format */ - FORMAT_YAML(opencv_core.FileStorage.FORMAT_YAML); + /** + * value, open the file for reading + */ + READ(FileStorage.READ), + /** + * value, open the file for writing + */ + WRITE(FileStorage.WRITE), + /** + * value, open the file for appending + */ + APPEND(FileStorage.APPEND), + /** + * flag, read data from source or write data to the internal buffer (which is returned by + * FileStorage::release) + */ + MEMORY(FileStorage.MEMORY), + /** + * mask for format flags + */ + FORMAT_MASK(FileStorage.FORMAT_MASK), + /** + * flag, auto format + */ + FORMAT_AUTO(FileStorage.FORMAT_AUTO), + /** + * flag, XML format + */ + FORMAT_XML(FileStorage.FORMAT_XML), + /** + * flag, YAML format + */ + FORMAT_YAML(FileStorage.FORMAT_YAML); - public final int value; + public final int value; - FileStorageModeEnum(int value) { - this.value = value; - } + FileStorageModeEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FormatterEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FormatterEnum.java index 686bffd90f..2846d67888 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FormatterEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/FormatterEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.Formatter; public enum FormatterEnum { - FMT_DEFAULT(opencv_core.Formatter.FMT_DEFAULT), FMT_MATLAB(opencv_core.Formatter.FMT_MATLAB), FMT_CSV(opencv_core.Formatter.FMT_CSV), FMT_PYTHON(opencv_core.Formatter.FMT_PYTHON), FMT_NUMPY(opencv_core.Formatter.FMT_NUMPY), FMT_C(opencv_core.Formatter.FMT_C); + FMT_DEFAULT(Formatter.FMT_DEFAULT), FMT_MATLAB(Formatter.FMT_MATLAB), FMT_CSV(Formatter.FMT_CSV), FMT_PYTHON(Formatter.FMT_PYTHON), FMT_NUMPY(Formatter.FMT_NUMPY), FMT_C(Formatter.FMT_C); - public final int value; + public final int value; - FormatterEnum(int value) { - this.value = value; - } + FormatterEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/GemmFlagsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/GemmFlagsEnum.java index c7884ba562..4e5f86cba7 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/GemmFlagsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/GemmFlagsEnum.java @@ -1,17 +1,25 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum GemmFlagsEnum { - /** transposes src1 */ - GEMM_1_T(opencv_core.GEMM_1_T), /** transposes src2 */ - GEMM_2_T(opencv_core.GEMM_2_T), /** transposes src3 */ - GEMM_3_T(opencv_core.GEMM_3_T); + /** + * transposes src1 + */ + GEMM_1_T(opencv_core.GEMM_1_T), + /** + * transposes src2 + */ + GEMM_2_T(opencv_core.GEMM_2_T), + /** + * transposes src3 + */ + GEMM_3_T(opencv_core.GEMM_3_T); - public final int value; + public final int value; - GemmFlagsEnum(int value) { - this.value = value; - } + GemmFlagsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/HammingEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/HammingEnum.java index 0cf9719831..4259541888 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/HammingEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/HammingEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.Hamming; public enum HammingEnum { - normType(opencv_core.Hamming.normType); + normType(Hamming.normType); - public final int value; + public final int value; - HammingEnum(int value) { - this.value = value; - } + HammingEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/HersheyFontsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/HersheyFontsEnum.java index c2b4c71abd..50e6f7caf7 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/HersheyFontsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/HersheyFontsEnum.java @@ -1,23 +1,49 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_imgproc; public enum HersheyFontsEnum { - /** normal size sans-serif font */ - FONT_HERSHEY_SIMPLEX(opencv_core.FONT_HERSHEY_SIMPLEX), /** small size sans-serif font */ - FONT_HERSHEY_PLAIN(opencv_core.FONT_HERSHEY_PLAIN), /** normal size sans-serif font (more complex than FONT_HERSHEY_SIMPLEX) */ - FONT_HERSHEY_DUPLEX(opencv_core.FONT_HERSHEY_DUPLEX), /** normal size serif font */ - FONT_HERSHEY_COMPLEX(opencv_core.FONT_HERSHEY_COMPLEX), /** normal size serif font (more complex than FONT_HERSHEY_COMPLEX) */ - FONT_HERSHEY_TRIPLEX(opencv_core.FONT_HERSHEY_TRIPLEX), /** smaller version of FONT_HERSHEY_COMPLEX */ - FONT_HERSHEY_COMPLEX_SMALL(opencv_core.FONT_HERSHEY_COMPLEX_SMALL), /** hand-writing style font */ - FONT_HERSHEY_SCRIPT_SIMPLEX(opencv_core.FONT_HERSHEY_SCRIPT_SIMPLEX), /** more complex variant of FONT_HERSHEY_SCRIPT_SIMPLEX */ - FONT_HERSHEY_SCRIPT_COMPLEX(opencv_core.FONT_HERSHEY_SCRIPT_COMPLEX), /** flag for italic font */ - FONT_ITALIC(opencv_core.FONT_ITALIC); + /** + * normal size sans-serif font + */ + FONT_HERSHEY_SIMPLEX(opencv_imgproc.FONT_HERSHEY_SIMPLEX), + /** + * small size sans-serif font + */ + FONT_HERSHEY_PLAIN(opencv_imgproc.FONT_HERSHEY_PLAIN), + /** + * normal size sans-serif font (more complex than FONT_HERSHEY_SIMPLEX) + */ + FONT_HERSHEY_DUPLEX(opencv_imgproc.FONT_HERSHEY_DUPLEX), + /** + * normal size serif font + */ + FONT_HERSHEY_COMPLEX(opencv_imgproc.FONT_HERSHEY_COMPLEX), + /** + * normal size serif font (more complex than FONT_HERSHEY_COMPLEX) + */ + FONT_HERSHEY_TRIPLEX(opencv_imgproc.FONT_HERSHEY_TRIPLEX), + /** + * smaller version of FONT_HERSHEY_COMPLEX + */ + FONT_HERSHEY_COMPLEX_SMALL(opencv_imgproc.FONT_HERSHEY_COMPLEX_SMALL), + /** + * hand-writing style font + */ + FONT_HERSHEY_SCRIPT_SIMPLEX(opencv_imgproc.FONT_HERSHEY_SCRIPT_SIMPLEX), + /** + * more complex variant of FONT_HERSHEY_SCRIPT_SIMPLEX + */ + FONT_HERSHEY_SCRIPT_COMPLEX(opencv_imgproc.FONT_HERSHEY_SCRIPT_COMPLEX), + /** + * flag for italic font + */ + FONT_ITALIC(opencv_imgproc.FONT_ITALIC); - public final int value; + public final int value; - HersheyFontsEnum(int value) { - this.value = value; - } + HersheyFontsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/KmeansFlagsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/KmeansFlagsEnum.java index 74153a25f8..f0c727dd3c 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/KmeansFlagsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/KmeansFlagsEnum.java @@ -1,20 +1,27 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum KmeansFlagsEnum { - /** Select random initial centers in each attempt.*/ - KMEANS_RANDOM_CENTERS(opencv_core.KMEANS_RANDOM_CENTERS), /** Use kmeans++ center initialization by Arthur and Vassilvitskii [Arthur2007].*/ - KMEANS_PP_CENTERS(opencv_core.KMEANS_PP_CENTERS), /** During the first (and possibly the only) attempt, use the - user-supplied labels instead of computing them from the initial centers. For the second and - further attempts, use the random or semi-random centers. Use one of KMEANS_\*_CENTERS flag - to specify the exact method.*/ - KMEANS_USE_INITIAL_LABELS(opencv_core.KMEANS_USE_INITIAL_LABELS); + /** + * Select random initial centers in each attempt. + */ + KMEANS_RANDOM_CENTERS(opencv_core.KMEANS_RANDOM_CENTERS), + /** + * Use kmeans++ center initialization by Arthur and Vassilvitskii [Arthur2007]. + */ + KMEANS_PP_CENTERS(opencv_core.KMEANS_PP_CENTERS), + /** + * During the first (and possibly the only) attempt, use the user-supplied labels instead of + * computing them from the initial centers. For the second and further attempts, use the random or + * semi-random centers. Use one of KMEANS_\*_CENTERS flag to specify the exact method. + */ + KMEANS_USE_INITIAL_LABELS(opencv_core.KMEANS_USE_INITIAL_LABELS); - public final int value; + public final int value; - KmeansFlagsEnum(int value) { - this.value = value; - } + KmeansFlagsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/LineTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/LineTypesEnum.java index d8afcc8d97..bc7a988403 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/LineTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/LineTypesEnum.java @@ -1,17 +1,26 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_imgproc; public enum LineTypesEnum { - FILLED(opencv_core.FILLED), /** 4-connected line */ - LINE_4(opencv_core.LINE_4), /** 8-connected line */ - LINE_8(opencv_core.LINE_8), /** antialiased line */ - LINE_AA(opencv_core.LINE_AA); + FILLED(opencv_imgproc.FILLED), + /** + * 4-connected line + */ + LINE_4(opencv_imgproc.LINE_4), + /** + * 8-connected line + */ + LINE_8(opencv_imgproc.LINE_8), + /** + * antialiased line + */ + LINE_AA(opencv_imgproc.LINE_AA); - public final int value; + public final int value; - LineTypesEnum(int value) { - this.value = value; - } + LineTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/MatEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/MatEnum.java index 4f074580d0..1153e28dd9 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/MatEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/MatEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.Mat; public enum MatEnum { - MAGIC_VAL(opencv_core.Mat.MAGIC_VAL), AUTO_STEP(opencv_core.Mat.AUTO_STEP), CONTINUOUS_FLAG(opencv_core.Mat.CONTINUOUS_FLAG), SUBMATRIX_FLAG(opencv_core.Mat.SUBMATRIX_FLAG), MAGIC_MASK(opencv_core.Mat.MAGIC_MASK), TYPE_MASK(opencv_core.Mat.TYPE_MASK), DEPTH_MASK(opencv_core.Mat.DEPTH_MASK); + MAGIC_VAL(Mat.MAGIC_VAL), AUTO_STEP(Mat.AUTO_STEP), CONTINUOUS_FLAG(Mat.CONTINUOUS_FLAG), SUBMATRIX_FLAG(Mat.SUBMATRIX_FLAG), MAGIC_MASK(Mat.MAGIC_MASK), TYPE_MASK(Mat.TYPE_MASK), DEPTH_MASK(Mat.DEPTH_MASK); - public final int value; + public final int value; - MatEnum(int value) { - this.value = value; - } + MatEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/NormTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/NormTypesEnum.java index 197759c7ec..8a77b3acf4 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/NormTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/NormTypesEnum.java @@ -1,16 +1,21 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum NormTypesEnum { + NORM_INF(opencv_core.NORM_INF), NORM_L1(opencv_core.NORM_L1), NORM_L2(opencv_core.NORM_L2), NORM_L2SQR(opencv_core.NORM_L2SQR), NORM_HAMMING(opencv_core.NORM_HAMMING), NORM_HAMMING2(opencv_core.NORM_HAMMING2), NORM_TYPE_MASK(opencv_core.NORM_TYPE_MASK), + /** + * flag + */ + NORM_RELATIVE(opencv_core.NORM_RELATIVE), + /** + * flag + */ + NORM_MINMAX(opencv_core.NORM_MINMAX); - NORM_INF(opencv_core.NORM_INF), NORM_L1(opencv_core.NORM_L1), NORM_L2(opencv_core.NORM_L2), NORM_L2SQR(opencv_core.NORM_L2SQR), NORM_HAMMING(opencv_core.NORM_HAMMING), NORM_HAMMING2(opencv_core.NORM_HAMMING2), NORM_TYPE_MASK(opencv_core.NORM_TYPE_MASK), /** flag */ - NORM_RELATIVE(opencv_core.NORM_RELATIVE), /** flag */ - NORM_MINMAX(opencv_core.NORM_MINMAX); + public final int value; - public final int value; - - NormTypesEnum(int value) { - this.value = value; - } + NormTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/PCAFlagsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/PCAFlagsEnum.java index cd15575fa1..e05452f699 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/PCAFlagsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/PCAFlagsEnum.java @@ -1,16 +1,21 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.PCA; public enum PCAFlagsEnum { - /** indicates that the input samples are stored as matrix rows */ - DATA_AS_ROW(opencv_core.PCA.DATA_AS_ROW), /** indicates that the input samples are stored as matrix columns */ - DATA_AS_COL(opencv_core.PCA.DATA_AS_COL), USE_AVG(opencv_core.PCA.USE_AVG); + /** + * indicates that the input samples are stored as matrix rows + */ + DATA_AS_ROW(PCA.DATA_AS_ROW), + /** + * indicates that the input samples are stored as matrix columns + */ + DATA_AS_COL(PCA.DATA_AS_COL), USE_AVG(PCA.USE_AVG); - public final int value; + public final int value; - PCAFlagsEnum(int value) { - this.value = value; - } + PCAFlagsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/ParamEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/ParamEnum.java deleted file mode 100644 index 3740fb6653..0000000000 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/ParamEnum.java +++ /dev/null @@ -1,14 +0,0 @@ -package edu.wpi.grip.generated.opencv_core.enumeration; - -import org.bytedeco.javacpp.opencv_core; - -public enum ParamEnum { - - INT(opencv_core.Param.INT), BOOLEAN(opencv_core.Param.BOOLEAN), REAL(opencv_core.Param.REAL), STRING(opencv_core.Param.STRING), MAT(opencv_core.Param.MAT), MAT_VECTOR(opencv_core.Param.MAT_VECTOR), ALGORITHM(opencv_core.Param.ALGORITHM), FLOAT(opencv_core.Param.FLOAT), UNSIGNED_INT(opencv_core.Param.UNSIGNED_INT), UINT64(opencv_core.Param.UINT64), UCHAR(opencv_core.Param.UCHAR); - - public final int value; - - ParamEnum(int value) { - this.value = value; - } -} diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/RNGEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/RNGEnum.java index 9f2a3c5953..eca039f5d1 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/RNGEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/RNGEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.RNG; public enum RNGEnum { - UNIFORM(opencv_core.RNG.UNIFORM), NORMAL(opencv_core.RNG.NORMAL); + UNIFORM(RNG.UNIFORM), NORMAL(RNG.NORMAL); - public final int value; + public final int value; - RNGEnum(int value) { - this.value = value; - } + RNGEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/ReduceTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/ReduceTypesEnum.java index e943bef5ba..c4fcf9b151 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/ReduceTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/ReduceTypesEnum.java @@ -1,18 +1,29 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum ReduceTypesEnum { - /** the output is the sum of all rows/columns of the matrix. */ - REDUCE_SUM(opencv_core.REDUCE_SUM), /** the output is the mean vector of all rows/columns of the matrix. */ - REDUCE_AVG(opencv_core.REDUCE_AVG), /** the output is the maximum (column/row-wise) of all rows/columns of the matrix. */ - REDUCE_MAX(opencv_core.REDUCE_MAX), /** the output is the minimum (column/row-wise) of all rows/columns of the matrix. */ - REDUCE_MIN(opencv_core.REDUCE_MIN); + /** + * the output is the sum of all rows/columns of the matrix. + */ + REDUCE_SUM(opencv_core.REDUCE_SUM), + /** + * the output is the mean vector of all rows/columns of the matrix. + */ + REDUCE_AVG(opencv_core.REDUCE_AVG), + /** + * the output is the maximum (column/row-wise) of all rows/columns of the matrix. + */ + REDUCE_MAX(opencv_core.REDUCE_MAX), + /** + * the output is the minimum (column/row-wise) of all rows/columns of the matrix. + */ + REDUCE_MIN(opencv_core.REDUCE_MIN); - public final int value; + public final int value; - ReduceTypesEnum(int value) { - this.value = value; - } + ReduceTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SVDFlagsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SVDFlagsEnum.java index b81d55402a..40b54c890d 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SVDFlagsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SVDFlagsEnum.java @@ -1,21 +1,29 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.SVD; public enum SVDFlagsEnum { - /** allow the algorithm to modify the decomposed matrix; it can save space and speed up - processing. currently ignored. */ - MODIFY_A(opencv_core.SVD.MODIFY_A), /** indicates that only a vector of singular values `w` is to be processed, while u and vt - will be set to empty matrices */ - NO_UV(opencv_core.SVD.NO_UV), /** when the matrix is not square, by default the algorithm produces u and vt matrices of - sufficiently large size for the further A reconstruction; if, however, FULL_UV flag is - specified, u and vt will be full-size square orthogonal matrices.*/ - FULL_UV(opencv_core.SVD.FULL_UV); + /** + * allow the algorithm to modify the decomposed matrix; it can save space and speed up processing. + * currently ignored. + */ + MODIFY_A(SVD.MODIFY_A), + /** + * indicates that only a vector of singular values `w` is to be processed, while u and vt will be + * set to empty matrices + */ + NO_UV(SVD.NO_UV), + /** + * when the matrix is not square, by default the algorithm produces u and vt matrices of + * sufficiently large size for the further A reconstruction; if, however, FULL_UV flag is + * specified, u and vt will be full-size square orthogonal matrices. + */ + FULL_UV(SVD.FULL_UV); - public final int value; + public final int value; - SVDFlagsEnum(int value) { - this.value = value; - } + SVDFlagsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SolveLPResultEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SolveLPResultEnum.java index 34dd7f45da..1d69cd9b1e 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SolveLPResultEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SolveLPResultEnum.java @@ -1,18 +1,29 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum SolveLPResultEnum { - /** problem is unbounded (target function can achieve arbitrary high values) */ - SOLVELP_UNBOUNDED(opencv_core.SOLVELP_UNBOUNDED), /** problem is unfeasible (there are no points that satisfy all the constraints imposed) */ - SOLVELP_UNFEASIBLE(opencv_core.SOLVELP_UNFEASIBLE), /** there is only one maximum for target function */ - SOLVELP_SINGLE(opencv_core.SOLVELP_SINGLE), /** there are multiple maxima for target function - the arbitrary one is returned */ - SOLVELP_MULTI(opencv_core.SOLVELP_MULTI); + /** + * problem is unbounded (target function can achieve arbitrary high values) + */ + SOLVELP_UNBOUNDED(opencv_core.SOLVELP_UNBOUNDED), + /** + * problem is unfeasible (there are no points that satisfy all the constraints imposed) + */ + SOLVELP_UNFEASIBLE(opencv_core.SOLVELP_UNFEASIBLE), + /** + * there is only one maximum for target function + */ + SOLVELP_SINGLE(opencv_core.SOLVELP_SINGLE), + /** + * there are multiple maxima for target function - the arbitrary one is returned + */ + SOLVELP_MULTI(opencv_core.SOLVELP_MULTI); - public final int value; + public final int value; - SolveLPResultEnum(int value) { - this.value = value; - } + SolveLPResultEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SortFlagsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SortFlagsEnum.java index 9dff6cf33e..b685cdd2fc 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SortFlagsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SortFlagsEnum.java @@ -1,23 +1,31 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum SortFlagsEnum { - /** each matrix row is sorted independently */ - SORT_EVERY_ROW(opencv_core.SORT_EVERY_ROW), /** each matrix column is sorted - * independently; this flag and the previous one are - * mutually exclusive. */ - SORT_EVERY_COLUMN(opencv_core.SORT_EVERY_COLUMN), /** each matrix row is sorted in the ascending - * order. */ - SORT_ASCENDING(opencv_core.SORT_ASCENDING), /** each matrix row is sorted in the - * descending order; this flag and the previous one are also - * mutually exclusive. */ - SORT_DESCENDING(opencv_core.SORT_DESCENDING); + /** + * each matrix row is sorted independently + */ + SORT_EVERY_ROW(opencv_core.SORT_EVERY_ROW), + /** + * each matrix column is sorted independently; this flag and the previous one are mutually + * exclusive. + */ + SORT_EVERY_COLUMN(opencv_core.SORT_EVERY_COLUMN), + /** + * each matrix row is sorted in the ascending order. + */ + SORT_ASCENDING(opencv_core.SORT_ASCENDING), + /** + * each matrix row is sorted in the descending order; this flag and the previous one are also + * mutually exclusive. + */ + SORT_DESCENDING(opencv_core.SORT_DESCENDING); - public final int value; + public final int value; - SortFlagsEnum(int value) { - this.value = value; - } + SortFlagsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SparseMatEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SparseMatEnum.java index 6325e797fd..a8528a6238 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SparseMatEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/SparseMatEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.SparseMat; public enum SparseMatEnum { - MAGIC_VAL(opencv_core.SparseMat.MAGIC_VAL), MAX_DIM(opencv_core.SparseMat.MAX_DIM), HASH_SCALE(opencv_core.SparseMat.HASH_SCALE), HASH_BIT(opencv_core.SparseMat.HASH_BIT); + MAGIC_VAL(SparseMat.MAGIC_VAL), MAX_DIM(SparseMat.MAX_DIM), HASH_SCALE(SparseMat.HASH_SCALE), HASH_BIT(SparseMat.HASH_BIT); - public final int value; + public final int value; - SparseMatEnum(int value) { - this.value = value; - } + SparseMatEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/TermCriteriaTypeEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/TermCriteriaTypeEnum.java index bd9fa9318c..4f544fece3 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/TermCriteriaTypeEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/TermCriteriaTypeEnum.java @@ -1,16 +1,21 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.TermCriteria; public enum TermCriteriaTypeEnum { - /** the maximum number of iterations or elements to compute */ - COUNT(opencv_core.TermCriteria.COUNT), MAX_ITER(opencv_core.TermCriteria.MAX_ITER), /** the desired accuracy or change in parameters at which the iterative algorithm stops */ - EPS(opencv_core.TermCriteria.EPS); + /** + * the maximum number of iterations or elements to compute + */ + COUNT(TermCriteria.COUNT), MAX_ITER(TermCriteria.MAX_ITER), + /** + * the desired accuracy or change in parameters at which the iterative algorithm stops + */ + EPS(TermCriteria.EPS); - public final int value; + public final int value; - TermCriteriaTypeEnum(int value) { - this.value = value; - } + TermCriteriaTypeEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatDataEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatDataEnum.java index 5c9544bc28..bd081cac00 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatDataEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatDataEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.UMatData; public enum UMatDataEnum { - COPY_ON_MAP(opencv_core.UMatData.COPY_ON_MAP), HOST_COPY_OBSOLETE(opencv_core.UMatData.HOST_COPY_OBSOLETE), DEVICE_COPY_OBSOLETE(opencv_core.UMatData.DEVICE_COPY_OBSOLETE), TEMP_UMAT(opencv_core.UMatData.TEMP_UMAT), TEMP_COPIED_UMAT(opencv_core.UMatData.TEMP_COPIED_UMAT), USER_ALLOCATED(opencv_core.UMatData.USER_ALLOCATED), DEVICE_MEM_MAPPED(opencv_core.UMatData.DEVICE_MEM_MAPPED); + COPY_ON_MAP(UMatData.COPY_ON_MAP), HOST_COPY_OBSOLETE(UMatData.HOST_COPY_OBSOLETE), DEVICE_COPY_OBSOLETE(UMatData.DEVICE_COPY_OBSOLETE), TEMP_UMAT(UMatData.TEMP_UMAT), TEMP_COPIED_UMAT(UMatData.TEMP_COPIED_UMAT), USER_ALLOCATED(UMatData.USER_ALLOCATED), DEVICE_MEM_MAPPED(UMatData.DEVICE_MEM_MAPPED); - public final int value; + public final int value; - UMatDataEnum(int value) { - this.value = value; - } + UMatDataEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatEnum.java index 4dc52d9ecc..c4bae36a71 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.opencv_core.UMat; public enum UMatEnum { - MAGIC_VAL(opencv_core.UMat.MAGIC_VAL), AUTO_STEP(opencv_core.UMat.AUTO_STEP), CONTINUOUS_FLAG(opencv_core.UMat.CONTINUOUS_FLAG), SUBMATRIX_FLAG(opencv_core.UMat.SUBMATRIX_FLAG), MAGIC_MASK(opencv_core.UMat.MAGIC_MASK), TYPE_MASK(opencv_core.UMat.TYPE_MASK), DEPTH_MASK(opencv_core.UMat.DEPTH_MASK); + MAGIC_VAL(UMat.MAGIC_VAL), AUTO_STEP(UMat.AUTO_STEP), CONTINUOUS_FLAG(UMat.CONTINUOUS_FLAG), SUBMATRIX_FLAG(UMat.SUBMATRIX_FLAG), MAGIC_MASK(UMat.MAGIC_MASK), TYPE_MASK(UMat.TYPE_MASK), DEPTH_MASK(UMat.DEPTH_MASK); - public final int value; + public final int value; - UMatEnum(int value) { - this.value = value; - } + UMatEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatUsageFlagsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatUsageFlagsEnum.java index d82fd0fe57..83ee9ad3c2 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatUsageFlagsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_core/enumeration/UMatUsageFlagsEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_core.enumeration; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; public enum UMatUsageFlagsEnum { - USAGE_DEFAULT(opencv_core.USAGE_DEFAULT), USAGE_ALLOCATE_HOST_MEMORY(opencv_core.USAGE_ALLOCATE_HOST_MEMORY), USAGE_ALLOCATE_DEVICE_MEMORY(opencv_core.USAGE_ALLOCATE_DEVICE_MEMORY), USAGE_ALLOCATE_SHARED_MEMORY(opencv_core.USAGE_ALLOCATE_SHARED_MEMORY), __UMAT_USAGE_FLAGS_32BIT(opencv_core.__UMAT_USAGE_FLAGS_32BIT); + USAGE_DEFAULT(opencv_core.USAGE_DEFAULT), USAGE_ALLOCATE_HOST_MEMORY(opencv_core.USAGE_ALLOCATE_HOST_MEMORY), USAGE_ALLOCATE_DEVICE_MEMORY(opencv_core.USAGE_ALLOCATE_DEVICE_MEMORY), USAGE_ALLOCATE_SHARED_MEMORY(opencv_core.USAGE_ALLOCATE_SHARED_MEMORY), __UMAT_USAGE_FLAGS_32BIT(opencv_core.__UMAT_USAGE_FLAGS_32BIT); - public final int value; + public final int value; - UMatUsageFlagsEnum(int value) { - this.value = value; - } + UMatUsageFlagsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/AdaptiveThresholdTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/AdaptiveThresholdTypesEnum.java index f2a863be5e..4c68caeae9 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/AdaptiveThresholdTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/AdaptiveThresholdTypesEnum.java @@ -1,20 +1,25 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum AdaptiveThresholdTypesEnum { - /** the threshold value \f$T(x,y)\f$ is a mean of the \f$\texttt{blockSize} \times - \texttt{blockSize}\f$ neighborhood of \f$(x, y)\f$ minus C */ - ADAPTIVE_THRESH_MEAN_C(opencv_imgproc.ADAPTIVE_THRESH_MEAN_C), /** the threshold value \f$T(x, y)\f$ is a weighted sum (cross-correlation with a Gaussian - window) of the \f$\texttt{blockSize} \times \texttt{blockSize}\f$ neighborhood of \f$(x, y)\f$ - minus C . The default sigma (standard deviation) is used for the specified blockSize . See - cv::getGaussianKernel*/ - ADAPTIVE_THRESH_GAUSSIAN_C(opencv_imgproc.ADAPTIVE_THRESH_GAUSSIAN_C); + /** + * the threshold value \f$T(x,y)\f$ is a mean of the \f$\texttt{blockSize} \times + * \texttt{blockSize}\f$ neighborhood of \f$(x, y)\f$ minus C + */ + ADAPTIVE_THRESH_MEAN_C(opencv_imgproc.ADAPTIVE_THRESH_MEAN_C), + /** + * the threshold value \f$T(x, y)\f$ is a weighted sum (cross-correlation with a Gaussian window) + * of the \f$\texttt{blockSize} \times \texttt{blockSize}\f$ neighborhood of \f$(x, y)\f$ minus C + * . The default sigma (standard deviation) is used for the specified blockSize . See + * cv::getGaussianKernel + */ + ADAPTIVE_THRESH_GAUSSIAN_C(opencv_imgproc.ADAPTIVE_THRESH_GAUSSIAN_C); - public final int value; + public final int value; - AdaptiveThresholdTypesEnum(int value) { - this.value = value; - } + AdaptiveThresholdTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ColorConversionCodesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ColorConversionCodesEnum.java index 32cf3240af..ca313595cc 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ColorConversionCodesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ColorConversionCodesEnum.java @@ -1,37 +1,106 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum ColorConversionCodesEnum { - /** add alpha channel to RGB or BGR image */ - COLOR_BGR2BGRA(opencv_imgproc.COLOR_BGR2BGRA), COLOR_RGB2RGBA(opencv_imgproc.COLOR_RGB2RGBA), /** remove alpha channel from RGB or BGR image */ - COLOR_BGRA2BGR(opencv_imgproc.COLOR_BGRA2BGR), COLOR_RGBA2RGB(opencv_imgproc.COLOR_RGBA2RGB), /** convert between RGB and BGR color spaces (with or without alpha channel) */ - COLOR_BGR2RGBA(opencv_imgproc.COLOR_BGR2RGBA), COLOR_RGB2BGRA(opencv_imgproc.COLOR_RGB2BGRA), COLOR_RGBA2BGR(opencv_imgproc.COLOR_RGBA2BGR), COLOR_BGRA2RGB(opencv_imgproc.COLOR_BGRA2RGB), COLOR_BGR2RGB(opencv_imgproc.COLOR_BGR2RGB), COLOR_RGB2BGR(opencv_imgproc.COLOR_RGB2BGR), COLOR_BGRA2RGBA(opencv_imgproc.COLOR_BGRA2RGBA), COLOR_RGBA2BGRA(opencv_imgproc.COLOR_RGBA2BGRA), /** convert between RGB/BGR and grayscale, @ref color_convert_rgb_gray "color conversions" */ - COLOR_BGR2GRAY(opencv_imgproc.COLOR_BGR2GRAY), COLOR_RGB2GRAY(opencv_imgproc.COLOR_RGB2GRAY), COLOR_GRAY2BGR(opencv_imgproc.COLOR_GRAY2BGR), COLOR_GRAY2RGB(opencv_imgproc.COLOR_GRAY2RGB), COLOR_GRAY2BGRA(opencv_imgproc.COLOR_GRAY2BGRA), COLOR_GRAY2RGBA(opencv_imgproc.COLOR_GRAY2RGBA), COLOR_BGRA2GRAY(opencv_imgproc.COLOR_BGRA2GRAY), COLOR_RGBA2GRAY(opencv_imgproc.COLOR_RGBA2GRAY), /** convert between RGB/BGR and BGR565 (16-bit images) */ - COLOR_BGR2BGR565(opencv_imgproc.COLOR_BGR2BGR565), COLOR_RGB2BGR565(opencv_imgproc.COLOR_RGB2BGR565), COLOR_BGR5652BGR(opencv_imgproc.COLOR_BGR5652BGR), COLOR_BGR5652RGB(opencv_imgproc.COLOR_BGR5652RGB), COLOR_BGRA2BGR565(opencv_imgproc.COLOR_BGRA2BGR565), COLOR_RGBA2BGR565(opencv_imgproc.COLOR_RGBA2BGR565), COLOR_BGR5652BGRA(opencv_imgproc.COLOR_BGR5652BGRA), COLOR_BGR5652RGBA(opencv_imgproc.COLOR_BGR5652RGBA), /** convert between grayscale to BGR565 (16-bit images) */ - COLOR_GRAY2BGR565(opencv_imgproc.COLOR_GRAY2BGR565), COLOR_BGR5652GRAY(opencv_imgproc.COLOR_BGR5652GRAY), /** convert between RGB/BGR and BGR555 (16-bit images) */ - COLOR_BGR2BGR555(opencv_imgproc.COLOR_BGR2BGR555), COLOR_RGB2BGR555(opencv_imgproc.COLOR_RGB2BGR555), COLOR_BGR5552BGR(opencv_imgproc.COLOR_BGR5552BGR), COLOR_BGR5552RGB(opencv_imgproc.COLOR_BGR5552RGB), COLOR_BGRA2BGR555(opencv_imgproc.COLOR_BGRA2BGR555), COLOR_RGBA2BGR555(opencv_imgproc.COLOR_RGBA2BGR555), COLOR_BGR5552BGRA(opencv_imgproc.COLOR_BGR5552BGRA), COLOR_BGR5552RGBA(opencv_imgproc.COLOR_BGR5552RGBA), /** convert between grayscale and BGR555 (16-bit images) */ - COLOR_GRAY2BGR555(opencv_imgproc.COLOR_GRAY2BGR555), COLOR_BGR5552GRAY(opencv_imgproc.COLOR_BGR5552GRAY), /** convert RGB/BGR to CIE XYZ, @ref color_convert_rgb_xyz "color conversions" */ - COLOR_BGR2XYZ(opencv_imgproc.COLOR_BGR2XYZ), COLOR_RGB2XYZ(opencv_imgproc.COLOR_RGB2XYZ), COLOR_XYZ2BGR(opencv_imgproc.COLOR_XYZ2BGR), COLOR_XYZ2RGB(opencv_imgproc.COLOR_XYZ2RGB), /** convert RGB/BGR to luma-chroma (aka YCC), @ref color_convert_rgb_ycrcb "color conversions" */ - COLOR_BGR2YCrCb(opencv_imgproc.COLOR_BGR2YCrCb), COLOR_RGB2YCrCb(opencv_imgproc.COLOR_RGB2YCrCb), COLOR_YCrCb2BGR(opencv_imgproc.COLOR_YCrCb2BGR), COLOR_YCrCb2RGB(opencv_imgproc.COLOR_YCrCb2RGB), /** convert RGB/BGR to HSV (hue saturation value), @ref color_convert_rgb_hsv "color conversions" */ - COLOR_BGR2HSV(opencv_imgproc.COLOR_BGR2HSV), COLOR_RGB2HSV(opencv_imgproc.COLOR_RGB2HSV), /** convert RGB/BGR to CIE Lab, @ref color_convert_rgb_lab "color conversions" */ - COLOR_BGR2Lab(opencv_imgproc.COLOR_BGR2Lab), COLOR_RGB2Lab(opencv_imgproc.COLOR_RGB2Lab), /** convert RGB/BGR to CIE Luv, @ref color_convert_rgb_luv "color conversions" */ - COLOR_BGR2Luv(opencv_imgproc.COLOR_BGR2Luv), COLOR_RGB2Luv(opencv_imgproc.COLOR_RGB2Luv), /** convert RGB/BGR to HLS (hue lightness saturation), @ref color_convert_rgb_hls "color conversions" */ - COLOR_BGR2HLS(opencv_imgproc.COLOR_BGR2HLS), COLOR_RGB2HLS(opencv_imgproc.COLOR_RGB2HLS), /** backward conversions to RGB/BGR */ - COLOR_HSV2BGR(opencv_imgproc.COLOR_HSV2BGR), COLOR_HSV2RGB(opencv_imgproc.COLOR_HSV2RGB), COLOR_Lab2BGR(opencv_imgproc.COLOR_Lab2BGR), COLOR_Lab2RGB(opencv_imgproc.COLOR_Lab2RGB), COLOR_Luv2BGR(opencv_imgproc.COLOR_Luv2BGR), COLOR_Luv2RGB(opencv_imgproc.COLOR_Luv2RGB), COLOR_HLS2BGR(opencv_imgproc.COLOR_HLS2BGR), COLOR_HLS2RGB(opencv_imgproc.COLOR_HLS2RGB), COLOR_BGR2HSV_FULL(opencv_imgproc.COLOR_BGR2HSV_FULL), COLOR_RGB2HSV_FULL(opencv_imgproc.COLOR_RGB2HSV_FULL), COLOR_BGR2HLS_FULL(opencv_imgproc.COLOR_BGR2HLS_FULL), COLOR_RGB2HLS_FULL(opencv_imgproc.COLOR_RGB2HLS_FULL), COLOR_HSV2BGR_FULL(opencv_imgproc.COLOR_HSV2BGR_FULL), COLOR_HSV2RGB_FULL(opencv_imgproc.COLOR_HSV2RGB_FULL), COLOR_HLS2BGR_FULL(opencv_imgproc.COLOR_HLS2BGR_FULL), COLOR_HLS2RGB_FULL(opencv_imgproc.COLOR_HLS2RGB_FULL), COLOR_LBGR2Lab(opencv_imgproc.COLOR_LBGR2Lab), COLOR_LRGB2Lab(opencv_imgproc.COLOR_LRGB2Lab), COLOR_LBGR2Luv(opencv_imgproc.COLOR_LBGR2Luv), COLOR_LRGB2Luv(opencv_imgproc.COLOR_LRGB2Luv), COLOR_Lab2LBGR(opencv_imgproc.COLOR_Lab2LBGR), COLOR_Lab2LRGB(opencv_imgproc.COLOR_Lab2LRGB), COLOR_Luv2LBGR(opencv_imgproc.COLOR_Luv2LBGR), COLOR_Luv2LRGB(opencv_imgproc.COLOR_Luv2LRGB), /** convert between RGB/BGR and YUV */ - COLOR_BGR2YUV(opencv_imgproc.COLOR_BGR2YUV), COLOR_RGB2YUV(opencv_imgproc.COLOR_RGB2YUV), COLOR_YUV2BGR(opencv_imgproc.COLOR_YUV2BGR), COLOR_YUV2RGB(opencv_imgproc.COLOR_YUV2RGB), /** YUV 4:2:0 family to RGB */ - COLOR_YUV2RGB_NV12(opencv_imgproc.COLOR_YUV2RGB_NV12), COLOR_YUV2BGR_NV12(opencv_imgproc.COLOR_YUV2BGR_NV12), COLOR_YUV2RGB_NV21(opencv_imgproc.COLOR_YUV2RGB_NV21), COLOR_YUV2BGR_NV21(opencv_imgproc.COLOR_YUV2BGR_NV21), COLOR_YUV420sp2RGB(opencv_imgproc.COLOR_YUV420sp2RGB), COLOR_YUV420sp2BGR(opencv_imgproc.COLOR_YUV420sp2BGR), COLOR_YUV2RGBA_NV12(opencv_imgproc.COLOR_YUV2RGBA_NV12), COLOR_YUV2BGRA_NV12(opencv_imgproc.COLOR_YUV2BGRA_NV12), COLOR_YUV2RGBA_NV21(opencv_imgproc.COLOR_YUV2RGBA_NV21), COLOR_YUV2BGRA_NV21(opencv_imgproc.COLOR_YUV2BGRA_NV21), COLOR_YUV420sp2RGBA(opencv_imgproc.COLOR_YUV420sp2RGBA), COLOR_YUV420sp2BGRA(opencv_imgproc.COLOR_YUV420sp2BGRA), COLOR_YUV2RGB_YV12(opencv_imgproc.COLOR_YUV2RGB_YV12), COLOR_YUV2BGR_YV12(opencv_imgproc.COLOR_YUV2BGR_YV12), COLOR_YUV2RGB_IYUV(opencv_imgproc.COLOR_YUV2RGB_IYUV), COLOR_YUV2BGR_IYUV(opencv_imgproc.COLOR_YUV2BGR_IYUV), COLOR_YUV2RGB_I420(opencv_imgproc.COLOR_YUV2RGB_I420), COLOR_YUV2BGR_I420(opencv_imgproc.COLOR_YUV2BGR_I420), COLOR_YUV420p2RGB(opencv_imgproc.COLOR_YUV420p2RGB), COLOR_YUV420p2BGR(opencv_imgproc.COLOR_YUV420p2BGR), COLOR_YUV2RGBA_YV12(opencv_imgproc.COLOR_YUV2RGBA_YV12), COLOR_YUV2BGRA_YV12(opencv_imgproc.COLOR_YUV2BGRA_YV12), COLOR_YUV2RGBA_IYUV(opencv_imgproc.COLOR_YUV2RGBA_IYUV), COLOR_YUV2BGRA_IYUV(opencv_imgproc.COLOR_YUV2BGRA_IYUV), COLOR_YUV2RGBA_I420(opencv_imgproc.COLOR_YUV2RGBA_I420), COLOR_YUV2BGRA_I420(opencv_imgproc.COLOR_YUV2BGRA_I420), COLOR_YUV420p2RGBA(opencv_imgproc.COLOR_YUV420p2RGBA), COLOR_YUV420p2BGRA(opencv_imgproc.COLOR_YUV420p2BGRA), COLOR_YUV2GRAY_420(opencv_imgproc.COLOR_YUV2GRAY_420), COLOR_YUV2GRAY_NV21(opencv_imgproc.COLOR_YUV2GRAY_NV21), COLOR_YUV2GRAY_NV12(opencv_imgproc.COLOR_YUV2GRAY_NV12), COLOR_YUV2GRAY_YV12(opencv_imgproc.COLOR_YUV2GRAY_YV12), COLOR_YUV2GRAY_IYUV(opencv_imgproc.COLOR_YUV2GRAY_IYUV), COLOR_YUV2GRAY_I420(opencv_imgproc.COLOR_YUV2GRAY_I420), COLOR_YUV420sp2GRAY(opencv_imgproc.COLOR_YUV420sp2GRAY), COLOR_YUV420p2GRAY(opencv_imgproc.COLOR_YUV420p2GRAY), /** YUV 4:2:2 family to RGB */ - COLOR_YUV2RGB_UYVY(opencv_imgproc.COLOR_YUV2RGB_UYVY), COLOR_YUV2BGR_UYVY(opencv_imgproc.COLOR_YUV2BGR_UYVY), COLOR_YUV2RGB_Y422(opencv_imgproc.COLOR_YUV2RGB_Y422), COLOR_YUV2BGR_Y422(opencv_imgproc.COLOR_YUV2BGR_Y422), COLOR_YUV2RGB_UYNV(opencv_imgproc.COLOR_YUV2RGB_UYNV), COLOR_YUV2BGR_UYNV(opencv_imgproc.COLOR_YUV2BGR_UYNV), COLOR_YUV2RGBA_UYVY(opencv_imgproc.COLOR_YUV2RGBA_UYVY), COLOR_YUV2BGRA_UYVY(opencv_imgproc.COLOR_YUV2BGRA_UYVY), COLOR_YUV2RGBA_Y422(opencv_imgproc.COLOR_YUV2RGBA_Y422), COLOR_YUV2BGRA_Y422(opencv_imgproc.COLOR_YUV2BGRA_Y422), COLOR_YUV2RGBA_UYNV(opencv_imgproc.COLOR_YUV2RGBA_UYNV), COLOR_YUV2BGRA_UYNV(opencv_imgproc.COLOR_YUV2BGRA_UYNV), COLOR_YUV2RGB_YUY2(opencv_imgproc.COLOR_YUV2RGB_YUY2), COLOR_YUV2BGR_YUY2(opencv_imgproc.COLOR_YUV2BGR_YUY2), COLOR_YUV2RGB_YVYU(opencv_imgproc.COLOR_YUV2RGB_YVYU), COLOR_YUV2BGR_YVYU(opencv_imgproc.COLOR_YUV2BGR_YVYU), COLOR_YUV2RGB_YUYV(opencv_imgproc.COLOR_YUV2RGB_YUYV), COLOR_YUV2BGR_YUYV(opencv_imgproc.COLOR_YUV2BGR_YUYV), COLOR_YUV2RGB_YUNV(opencv_imgproc.COLOR_YUV2RGB_YUNV), COLOR_YUV2BGR_YUNV(opencv_imgproc.COLOR_YUV2BGR_YUNV), COLOR_YUV2RGBA_YUY2(opencv_imgproc.COLOR_YUV2RGBA_YUY2), COLOR_YUV2BGRA_YUY2(opencv_imgproc.COLOR_YUV2BGRA_YUY2), COLOR_YUV2RGBA_YVYU(opencv_imgproc.COLOR_YUV2RGBA_YVYU), COLOR_YUV2BGRA_YVYU(opencv_imgproc.COLOR_YUV2BGRA_YVYU), COLOR_YUV2RGBA_YUYV(opencv_imgproc.COLOR_YUV2RGBA_YUYV), COLOR_YUV2BGRA_YUYV(opencv_imgproc.COLOR_YUV2BGRA_YUYV), COLOR_YUV2RGBA_YUNV(opencv_imgproc.COLOR_YUV2RGBA_YUNV), COLOR_YUV2BGRA_YUNV(opencv_imgproc.COLOR_YUV2BGRA_YUNV), COLOR_YUV2GRAY_UYVY(opencv_imgproc.COLOR_YUV2GRAY_UYVY), COLOR_YUV2GRAY_YUY2(opencv_imgproc.COLOR_YUV2GRAY_YUY2), COLOR_YUV2GRAY_Y422(opencv_imgproc.COLOR_YUV2GRAY_Y422), COLOR_YUV2GRAY_UYNV(opencv_imgproc.COLOR_YUV2GRAY_UYNV), COLOR_YUV2GRAY_YVYU(opencv_imgproc.COLOR_YUV2GRAY_YVYU), COLOR_YUV2GRAY_YUYV(opencv_imgproc.COLOR_YUV2GRAY_YUYV), COLOR_YUV2GRAY_YUNV(opencv_imgproc.COLOR_YUV2GRAY_YUNV), /** alpha premultiplication */ - COLOR_RGBA2mRGBA(opencv_imgproc.COLOR_RGBA2mRGBA), COLOR_mRGBA2RGBA(opencv_imgproc.COLOR_mRGBA2RGBA), /** RGB to YUV 4:2:0 family */ - COLOR_RGB2YUV_I420(opencv_imgproc.COLOR_RGB2YUV_I420), COLOR_BGR2YUV_I420(opencv_imgproc.COLOR_BGR2YUV_I420), COLOR_RGB2YUV_IYUV(opencv_imgproc.COLOR_RGB2YUV_IYUV), COLOR_BGR2YUV_IYUV(opencv_imgproc.COLOR_BGR2YUV_IYUV), COLOR_RGBA2YUV_I420(opencv_imgproc.COLOR_RGBA2YUV_I420), COLOR_BGRA2YUV_I420(opencv_imgproc.COLOR_BGRA2YUV_I420), COLOR_RGBA2YUV_IYUV(opencv_imgproc.COLOR_RGBA2YUV_IYUV), COLOR_BGRA2YUV_IYUV(opencv_imgproc.COLOR_BGRA2YUV_IYUV), COLOR_RGB2YUV_YV12(opencv_imgproc.COLOR_RGB2YUV_YV12), COLOR_BGR2YUV_YV12(opencv_imgproc.COLOR_BGR2YUV_YV12), COLOR_RGBA2YUV_YV12(opencv_imgproc.COLOR_RGBA2YUV_YV12), COLOR_BGRA2YUV_YV12(opencv_imgproc.COLOR_BGRA2YUV_YV12), /** Demosaicing */ - COLOR_BayerBG2BGR(opencv_imgproc.COLOR_BayerBG2BGR), COLOR_BayerGB2BGR(opencv_imgproc.COLOR_BayerGB2BGR), COLOR_BayerRG2BGR(opencv_imgproc.COLOR_BayerRG2BGR), COLOR_BayerGR2BGR(opencv_imgproc.COLOR_BayerGR2BGR), COLOR_BayerBG2RGB(opencv_imgproc.COLOR_BayerBG2RGB), COLOR_BayerGB2RGB(opencv_imgproc.COLOR_BayerGB2RGB), COLOR_BayerRG2RGB(opencv_imgproc.COLOR_BayerRG2RGB), COLOR_BayerGR2RGB(opencv_imgproc.COLOR_BayerGR2RGB), COLOR_BayerBG2GRAY(opencv_imgproc.COLOR_BayerBG2GRAY), COLOR_BayerGB2GRAY(opencv_imgproc.COLOR_BayerGB2GRAY), COLOR_BayerRG2GRAY(opencv_imgproc.COLOR_BayerRG2GRAY), COLOR_BayerGR2GRAY(opencv_imgproc.COLOR_BayerGR2GRAY), /** Demosaicing using Variable Number of Gradients */ - COLOR_BayerBG2BGR_VNG(opencv_imgproc.COLOR_BayerBG2BGR_VNG), COLOR_BayerGB2BGR_VNG(opencv_imgproc.COLOR_BayerGB2BGR_VNG), COLOR_BayerRG2BGR_VNG(opencv_imgproc.COLOR_BayerRG2BGR_VNG), COLOR_BayerGR2BGR_VNG(opencv_imgproc.COLOR_BayerGR2BGR_VNG), COLOR_BayerBG2RGB_VNG(opencv_imgproc.COLOR_BayerBG2RGB_VNG), COLOR_BayerGB2RGB_VNG(opencv_imgproc.COLOR_BayerGB2RGB_VNG), COLOR_BayerRG2RGB_VNG(opencv_imgproc.COLOR_BayerRG2RGB_VNG), COLOR_BayerGR2RGB_VNG(opencv_imgproc.COLOR_BayerGR2RGB_VNG), /** Edge-Aware Demosaicing */ - COLOR_BayerBG2BGR_EA(opencv_imgproc.COLOR_BayerBG2BGR_EA), COLOR_BayerGB2BGR_EA(opencv_imgproc.COLOR_BayerGB2BGR_EA), COLOR_BayerRG2BGR_EA(opencv_imgproc.COLOR_BayerRG2BGR_EA), COLOR_BayerGR2BGR_EA(opencv_imgproc.COLOR_BayerGR2BGR_EA), COLOR_BayerBG2RGB_EA(opencv_imgproc.COLOR_BayerBG2RGB_EA), COLOR_BayerGB2RGB_EA(opencv_imgproc.COLOR_BayerGB2RGB_EA), COLOR_BayerRG2RGB_EA(opencv_imgproc.COLOR_BayerRG2RGB_EA), COLOR_BayerGR2RGB_EA(opencv_imgproc.COLOR_BayerGR2RGB_EA), COLOR_COLORCVT_MAX(opencv_imgproc.COLOR_COLORCVT_MAX); + /** + * add alpha channel to RGB or BGR image + */ + COLOR_BGR2BGRA(opencv_imgproc.COLOR_BGR2BGRA), COLOR_RGB2RGBA(opencv_imgproc.COLOR_RGB2RGBA), + /** + * remove alpha channel from RGB or BGR image + */ + COLOR_BGRA2BGR(opencv_imgproc.COLOR_BGRA2BGR), COLOR_RGBA2RGB(opencv_imgproc.COLOR_RGBA2RGB), + /** + * convert between RGB and BGR color spaces (with or without alpha channel) + */ + COLOR_BGR2RGBA(opencv_imgproc.COLOR_BGR2RGBA), COLOR_RGB2BGRA(opencv_imgproc.COLOR_RGB2BGRA), COLOR_RGBA2BGR(opencv_imgproc.COLOR_RGBA2BGR), COLOR_BGRA2RGB(opencv_imgproc.COLOR_BGRA2RGB), COLOR_BGR2RGB(opencv_imgproc.COLOR_BGR2RGB), COLOR_RGB2BGR(opencv_imgproc.COLOR_RGB2BGR), COLOR_BGRA2RGBA(opencv_imgproc.COLOR_BGRA2RGBA), COLOR_RGBA2BGRA(opencv_imgproc.COLOR_RGBA2BGRA), + /** + * convert between RGB/BGR and grayscale, @ref color_convert_rgb_gray "color conversions" + */ + COLOR_BGR2GRAY(opencv_imgproc.COLOR_BGR2GRAY), COLOR_RGB2GRAY(opencv_imgproc.COLOR_RGB2GRAY), COLOR_GRAY2BGR(opencv_imgproc.COLOR_GRAY2BGR), COLOR_GRAY2RGB(opencv_imgproc.COLOR_GRAY2RGB), COLOR_GRAY2BGRA(opencv_imgproc.COLOR_GRAY2BGRA), COLOR_GRAY2RGBA(opencv_imgproc.COLOR_GRAY2RGBA), COLOR_BGRA2GRAY(opencv_imgproc.COLOR_BGRA2GRAY), COLOR_RGBA2GRAY(opencv_imgproc.COLOR_RGBA2GRAY), + /** + * convert between RGB/BGR and BGR565 (16-bit images) + */ + COLOR_BGR2BGR565(opencv_imgproc.COLOR_BGR2BGR565), COLOR_RGB2BGR565(opencv_imgproc.COLOR_RGB2BGR565), COLOR_BGR5652BGR(opencv_imgproc.COLOR_BGR5652BGR), COLOR_BGR5652RGB(opencv_imgproc.COLOR_BGR5652RGB), COLOR_BGRA2BGR565(opencv_imgproc.COLOR_BGRA2BGR565), COLOR_RGBA2BGR565(opencv_imgproc.COLOR_RGBA2BGR565), COLOR_BGR5652BGRA(opencv_imgproc.COLOR_BGR5652BGRA), COLOR_BGR5652RGBA(opencv_imgproc.COLOR_BGR5652RGBA), + /** + * convert between grayscale to BGR565 (16-bit images) + */ + COLOR_GRAY2BGR565(opencv_imgproc.COLOR_GRAY2BGR565), COLOR_BGR5652GRAY(opencv_imgproc.COLOR_BGR5652GRAY), + /** + * convert between RGB/BGR and BGR555 (16-bit images) + */ + COLOR_BGR2BGR555(opencv_imgproc.COLOR_BGR2BGR555), COLOR_RGB2BGR555(opencv_imgproc.COLOR_RGB2BGR555), COLOR_BGR5552BGR(opencv_imgproc.COLOR_BGR5552BGR), COLOR_BGR5552RGB(opencv_imgproc.COLOR_BGR5552RGB), COLOR_BGRA2BGR555(opencv_imgproc.COLOR_BGRA2BGR555), COLOR_RGBA2BGR555(opencv_imgproc.COLOR_RGBA2BGR555), COLOR_BGR5552BGRA(opencv_imgproc.COLOR_BGR5552BGRA), COLOR_BGR5552RGBA(opencv_imgproc.COLOR_BGR5552RGBA), + /** + * convert between grayscale and BGR555 (16-bit images) + */ + COLOR_GRAY2BGR555(opencv_imgproc.COLOR_GRAY2BGR555), COLOR_BGR5552GRAY(opencv_imgproc.COLOR_BGR5552GRAY), + /** + * convert RGB/BGR to CIE XYZ, @ref color_convert_rgb_xyz "color conversions" + */ + COLOR_BGR2XYZ(opencv_imgproc.COLOR_BGR2XYZ), COLOR_RGB2XYZ(opencv_imgproc.COLOR_RGB2XYZ), COLOR_XYZ2BGR(opencv_imgproc.COLOR_XYZ2BGR), COLOR_XYZ2RGB(opencv_imgproc.COLOR_XYZ2RGB), + /** + * convert RGB/BGR to luma-chroma (aka YCC), @ref color_convert_rgb_ycrcb "color conversions" + */ + COLOR_BGR2YCrCb(opencv_imgproc.COLOR_BGR2YCrCb), COLOR_RGB2YCrCb(opencv_imgproc.COLOR_RGB2YCrCb), COLOR_YCrCb2BGR(opencv_imgproc.COLOR_YCrCb2BGR), COLOR_YCrCb2RGB(opencv_imgproc.COLOR_YCrCb2RGB), + /** + * convert RGB/BGR to HSV (hue saturation value), @ref color_convert_rgb_hsv "color conversions" + */ + COLOR_BGR2HSV(opencv_imgproc.COLOR_BGR2HSV), COLOR_RGB2HSV(opencv_imgproc.COLOR_RGB2HSV), + /** + * convert RGB/BGR to CIE Lab, @ref color_convert_rgb_lab "color conversions" + */ + COLOR_BGR2Lab(opencv_imgproc.COLOR_BGR2Lab), COLOR_RGB2Lab(opencv_imgproc.COLOR_RGB2Lab), + /** + * convert RGB/BGR to CIE Luv, @ref color_convert_rgb_luv "color conversions" + */ + COLOR_BGR2Luv(opencv_imgproc.COLOR_BGR2Luv), COLOR_RGB2Luv(opencv_imgproc.COLOR_RGB2Luv), + /** + * convert RGB/BGR to HLS (hue lightness saturation), @ref color_convert_rgb_hls "color + * conversions" + */ + COLOR_BGR2HLS(opencv_imgproc.COLOR_BGR2HLS), COLOR_RGB2HLS(opencv_imgproc.COLOR_RGB2HLS), + /** + * backward conversions to RGB/BGR + */ + COLOR_HSV2BGR(opencv_imgproc.COLOR_HSV2BGR), COLOR_HSV2RGB(opencv_imgproc.COLOR_HSV2RGB), COLOR_Lab2BGR(opencv_imgproc.COLOR_Lab2BGR), COLOR_Lab2RGB(opencv_imgproc.COLOR_Lab2RGB), COLOR_Luv2BGR(opencv_imgproc.COLOR_Luv2BGR), COLOR_Luv2RGB(opencv_imgproc.COLOR_Luv2RGB), COLOR_HLS2BGR(opencv_imgproc.COLOR_HLS2BGR), COLOR_HLS2RGB(opencv_imgproc.COLOR_HLS2RGB), COLOR_BGR2HSV_FULL(opencv_imgproc.COLOR_BGR2HSV_FULL), COLOR_RGB2HSV_FULL(opencv_imgproc.COLOR_RGB2HSV_FULL), COLOR_BGR2HLS_FULL(opencv_imgproc.COLOR_BGR2HLS_FULL), COLOR_RGB2HLS_FULL(opencv_imgproc.COLOR_RGB2HLS_FULL), COLOR_HSV2BGR_FULL(opencv_imgproc.COLOR_HSV2BGR_FULL), COLOR_HSV2RGB_FULL(opencv_imgproc.COLOR_HSV2RGB_FULL), COLOR_HLS2BGR_FULL(opencv_imgproc.COLOR_HLS2BGR_FULL), COLOR_HLS2RGB_FULL(opencv_imgproc.COLOR_HLS2RGB_FULL), COLOR_LBGR2Lab(opencv_imgproc.COLOR_LBGR2Lab), COLOR_LRGB2Lab(opencv_imgproc.COLOR_LRGB2Lab), COLOR_LBGR2Luv(opencv_imgproc.COLOR_LBGR2Luv), COLOR_LRGB2Luv(opencv_imgproc.COLOR_LRGB2Luv), COLOR_Lab2LBGR(opencv_imgproc.COLOR_Lab2LBGR), COLOR_Lab2LRGB(opencv_imgproc.COLOR_Lab2LRGB), COLOR_Luv2LBGR(opencv_imgproc.COLOR_Luv2LBGR), COLOR_Luv2LRGB(opencv_imgproc.COLOR_Luv2LRGB), + /** + * convert between RGB/BGR and YUV + */ + COLOR_BGR2YUV(opencv_imgproc.COLOR_BGR2YUV), COLOR_RGB2YUV(opencv_imgproc.COLOR_RGB2YUV), COLOR_YUV2BGR(opencv_imgproc.COLOR_YUV2BGR), COLOR_YUV2RGB(opencv_imgproc.COLOR_YUV2RGB), + /** + * YUV 4:2:0 family to RGB + */ + COLOR_YUV2RGB_NV12(opencv_imgproc.COLOR_YUV2RGB_NV12), COLOR_YUV2BGR_NV12(opencv_imgproc.COLOR_YUV2BGR_NV12), COLOR_YUV2RGB_NV21(opencv_imgproc.COLOR_YUV2RGB_NV21), COLOR_YUV2BGR_NV21(opencv_imgproc.COLOR_YUV2BGR_NV21), COLOR_YUV420sp2RGB(opencv_imgproc.COLOR_YUV420sp2RGB), COLOR_YUV420sp2BGR(opencv_imgproc.COLOR_YUV420sp2BGR), COLOR_YUV2RGBA_NV12(opencv_imgproc.COLOR_YUV2RGBA_NV12), COLOR_YUV2BGRA_NV12(opencv_imgproc.COLOR_YUV2BGRA_NV12), COLOR_YUV2RGBA_NV21(opencv_imgproc.COLOR_YUV2RGBA_NV21), COLOR_YUV2BGRA_NV21(opencv_imgproc.COLOR_YUV2BGRA_NV21), COLOR_YUV420sp2RGBA(opencv_imgproc.COLOR_YUV420sp2RGBA), COLOR_YUV420sp2BGRA(opencv_imgproc.COLOR_YUV420sp2BGRA), COLOR_YUV2RGB_YV12(opencv_imgproc.COLOR_YUV2RGB_YV12), COLOR_YUV2BGR_YV12(opencv_imgproc.COLOR_YUV2BGR_YV12), COLOR_YUV2RGB_IYUV(opencv_imgproc.COLOR_YUV2RGB_IYUV), COLOR_YUV2BGR_IYUV(opencv_imgproc.COLOR_YUV2BGR_IYUV), COLOR_YUV2RGB_I420(opencv_imgproc.COLOR_YUV2RGB_I420), COLOR_YUV2BGR_I420(opencv_imgproc.COLOR_YUV2BGR_I420), COLOR_YUV420p2RGB(opencv_imgproc.COLOR_YUV420p2RGB), COLOR_YUV420p2BGR(opencv_imgproc.COLOR_YUV420p2BGR), COLOR_YUV2RGBA_YV12(opencv_imgproc.COLOR_YUV2RGBA_YV12), COLOR_YUV2BGRA_YV12(opencv_imgproc.COLOR_YUV2BGRA_YV12), COLOR_YUV2RGBA_IYUV(opencv_imgproc.COLOR_YUV2RGBA_IYUV), COLOR_YUV2BGRA_IYUV(opencv_imgproc.COLOR_YUV2BGRA_IYUV), COLOR_YUV2RGBA_I420(opencv_imgproc.COLOR_YUV2RGBA_I420), COLOR_YUV2BGRA_I420(opencv_imgproc.COLOR_YUV2BGRA_I420), COLOR_YUV420p2RGBA(opencv_imgproc.COLOR_YUV420p2RGBA), COLOR_YUV420p2BGRA(opencv_imgproc.COLOR_YUV420p2BGRA), COLOR_YUV2GRAY_420(opencv_imgproc.COLOR_YUV2GRAY_420), COLOR_YUV2GRAY_NV21(opencv_imgproc.COLOR_YUV2GRAY_NV21), COLOR_YUV2GRAY_NV12(opencv_imgproc.COLOR_YUV2GRAY_NV12), COLOR_YUV2GRAY_YV12(opencv_imgproc.COLOR_YUV2GRAY_YV12), COLOR_YUV2GRAY_IYUV(opencv_imgproc.COLOR_YUV2GRAY_IYUV), COLOR_YUV2GRAY_I420(opencv_imgproc.COLOR_YUV2GRAY_I420), COLOR_YUV420sp2GRAY(opencv_imgproc.COLOR_YUV420sp2GRAY), COLOR_YUV420p2GRAY(opencv_imgproc.COLOR_YUV420p2GRAY), + /** + * YUV 4:2:2 family to RGB + */ + COLOR_YUV2RGB_UYVY(opencv_imgproc.COLOR_YUV2RGB_UYVY), COLOR_YUV2BGR_UYVY(opencv_imgproc.COLOR_YUV2BGR_UYVY), COLOR_YUV2RGB_Y422(opencv_imgproc.COLOR_YUV2RGB_Y422), COLOR_YUV2BGR_Y422(opencv_imgproc.COLOR_YUV2BGR_Y422), COLOR_YUV2RGB_UYNV(opencv_imgproc.COLOR_YUV2RGB_UYNV), COLOR_YUV2BGR_UYNV(opencv_imgproc.COLOR_YUV2BGR_UYNV), COLOR_YUV2RGBA_UYVY(opencv_imgproc.COLOR_YUV2RGBA_UYVY), COLOR_YUV2BGRA_UYVY(opencv_imgproc.COLOR_YUV2BGRA_UYVY), COLOR_YUV2RGBA_Y422(opencv_imgproc.COLOR_YUV2RGBA_Y422), COLOR_YUV2BGRA_Y422(opencv_imgproc.COLOR_YUV2BGRA_Y422), COLOR_YUV2RGBA_UYNV(opencv_imgproc.COLOR_YUV2RGBA_UYNV), COLOR_YUV2BGRA_UYNV(opencv_imgproc.COLOR_YUV2BGRA_UYNV), COLOR_YUV2RGB_YUY2(opencv_imgproc.COLOR_YUV2RGB_YUY2), COLOR_YUV2BGR_YUY2(opencv_imgproc.COLOR_YUV2BGR_YUY2), COLOR_YUV2RGB_YVYU(opencv_imgproc.COLOR_YUV2RGB_YVYU), COLOR_YUV2BGR_YVYU(opencv_imgproc.COLOR_YUV2BGR_YVYU), COLOR_YUV2RGB_YUYV(opencv_imgproc.COLOR_YUV2RGB_YUYV), COLOR_YUV2BGR_YUYV(opencv_imgproc.COLOR_YUV2BGR_YUYV), COLOR_YUV2RGB_YUNV(opencv_imgproc.COLOR_YUV2RGB_YUNV), COLOR_YUV2BGR_YUNV(opencv_imgproc.COLOR_YUV2BGR_YUNV), COLOR_YUV2RGBA_YUY2(opencv_imgproc.COLOR_YUV2RGBA_YUY2), COLOR_YUV2BGRA_YUY2(opencv_imgproc.COLOR_YUV2BGRA_YUY2), COLOR_YUV2RGBA_YVYU(opencv_imgproc.COLOR_YUV2RGBA_YVYU), COLOR_YUV2BGRA_YVYU(opencv_imgproc.COLOR_YUV2BGRA_YVYU), COLOR_YUV2RGBA_YUYV(opencv_imgproc.COLOR_YUV2RGBA_YUYV), COLOR_YUV2BGRA_YUYV(opencv_imgproc.COLOR_YUV2BGRA_YUYV), COLOR_YUV2RGBA_YUNV(opencv_imgproc.COLOR_YUV2RGBA_YUNV), COLOR_YUV2BGRA_YUNV(opencv_imgproc.COLOR_YUV2BGRA_YUNV), COLOR_YUV2GRAY_UYVY(opencv_imgproc.COLOR_YUV2GRAY_UYVY), COLOR_YUV2GRAY_YUY2(opencv_imgproc.COLOR_YUV2GRAY_YUY2), COLOR_YUV2GRAY_Y422(opencv_imgproc.COLOR_YUV2GRAY_Y422), COLOR_YUV2GRAY_UYNV(opencv_imgproc.COLOR_YUV2GRAY_UYNV), COLOR_YUV2GRAY_YVYU(opencv_imgproc.COLOR_YUV2GRAY_YVYU), COLOR_YUV2GRAY_YUYV(opencv_imgproc.COLOR_YUV2GRAY_YUYV), COLOR_YUV2GRAY_YUNV(opencv_imgproc.COLOR_YUV2GRAY_YUNV), + /** + * alpha premultiplication + */ + COLOR_RGBA2mRGBA(opencv_imgproc.COLOR_RGBA2mRGBA), COLOR_mRGBA2RGBA(opencv_imgproc.COLOR_mRGBA2RGBA), + /** + * RGB to YUV 4:2:0 family + */ + COLOR_RGB2YUV_I420(opencv_imgproc.COLOR_RGB2YUV_I420), COLOR_BGR2YUV_I420(opencv_imgproc.COLOR_BGR2YUV_I420), COLOR_RGB2YUV_IYUV(opencv_imgproc.COLOR_RGB2YUV_IYUV), COLOR_BGR2YUV_IYUV(opencv_imgproc.COLOR_BGR2YUV_IYUV), COLOR_RGBA2YUV_I420(opencv_imgproc.COLOR_RGBA2YUV_I420), COLOR_BGRA2YUV_I420(opencv_imgproc.COLOR_BGRA2YUV_I420), COLOR_RGBA2YUV_IYUV(opencv_imgproc.COLOR_RGBA2YUV_IYUV), COLOR_BGRA2YUV_IYUV(opencv_imgproc.COLOR_BGRA2YUV_IYUV), COLOR_RGB2YUV_YV12(opencv_imgproc.COLOR_RGB2YUV_YV12), COLOR_BGR2YUV_YV12(opencv_imgproc.COLOR_BGR2YUV_YV12), COLOR_RGBA2YUV_YV12(opencv_imgproc.COLOR_RGBA2YUV_YV12), COLOR_BGRA2YUV_YV12(opencv_imgproc.COLOR_BGRA2YUV_YV12), + /** + * Demosaicing + */ + COLOR_BayerBG2BGR(opencv_imgproc.COLOR_BayerBG2BGR), COLOR_BayerGB2BGR(opencv_imgproc.COLOR_BayerGB2BGR), COLOR_BayerRG2BGR(opencv_imgproc.COLOR_BayerRG2BGR), COLOR_BayerGR2BGR(opencv_imgproc.COLOR_BayerGR2BGR), COLOR_BayerBG2RGB(opencv_imgproc.COLOR_BayerBG2RGB), COLOR_BayerGB2RGB(opencv_imgproc.COLOR_BayerGB2RGB), COLOR_BayerRG2RGB(opencv_imgproc.COLOR_BayerRG2RGB), COLOR_BayerGR2RGB(opencv_imgproc.COLOR_BayerGR2RGB), COLOR_BayerBG2GRAY(opencv_imgproc.COLOR_BayerBG2GRAY), COLOR_BayerGB2GRAY(opencv_imgproc.COLOR_BayerGB2GRAY), COLOR_BayerRG2GRAY(opencv_imgproc.COLOR_BayerRG2GRAY), COLOR_BayerGR2GRAY(opencv_imgproc.COLOR_BayerGR2GRAY), + /** + * Demosaicing using Variable Number of Gradients + */ + COLOR_BayerBG2BGR_VNG(opencv_imgproc.COLOR_BayerBG2BGR_VNG), COLOR_BayerGB2BGR_VNG(opencv_imgproc.COLOR_BayerGB2BGR_VNG), COLOR_BayerRG2BGR_VNG(opencv_imgproc.COLOR_BayerRG2BGR_VNG), COLOR_BayerGR2BGR_VNG(opencv_imgproc.COLOR_BayerGR2BGR_VNG), COLOR_BayerBG2RGB_VNG(opencv_imgproc.COLOR_BayerBG2RGB_VNG), COLOR_BayerGB2RGB_VNG(opencv_imgproc.COLOR_BayerGB2RGB_VNG), COLOR_BayerRG2RGB_VNG(opencv_imgproc.COLOR_BayerRG2RGB_VNG), COLOR_BayerGR2RGB_VNG(opencv_imgproc.COLOR_BayerGR2RGB_VNG), + /** + * Edge-Aware Demosaicing + */ + COLOR_BayerBG2BGR_EA(opencv_imgproc.COLOR_BayerBG2BGR_EA), COLOR_BayerGB2BGR_EA(opencv_imgproc.COLOR_BayerGB2BGR_EA), COLOR_BayerRG2BGR_EA(opencv_imgproc.COLOR_BayerRG2BGR_EA), COLOR_BayerGR2BGR_EA(opencv_imgproc.COLOR_BayerGR2BGR_EA), COLOR_BayerBG2RGB_EA(opencv_imgproc.COLOR_BayerBG2RGB_EA), COLOR_BayerGB2RGB_EA(opencv_imgproc.COLOR_BayerGB2RGB_EA), COLOR_BayerRG2RGB_EA(opencv_imgproc.COLOR_BayerRG2RGB_EA), COLOR_BayerGR2RGB_EA(opencv_imgproc.COLOR_BayerGR2RGB_EA), COLOR_COLORCVT_MAX(opencv_imgproc.COLOR_COLORCVT_MAX); - public final int value; + public final int value; - ColorConversionCodesEnum(int value) { - this.value = value; - } + ColorConversionCodesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ColormapTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ColormapTypesEnum.java index 2d58505259..f54934c05b 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ColormapTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ColormapTypesEnum.java @@ -1,27 +1,65 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum ColormapTypesEnum { - /** ![autumn](pics/colormaps/colorscale_autumn.jpg) */ - COLORMAP_AUTUMN(opencv_imgproc.COLORMAP_AUTUMN), /** ![bone](pics/colormaps/colorscale_bone.jpg) */ - COLORMAP_BONE(opencv_imgproc.COLORMAP_BONE), /** ![jet](pics/colormaps/colorscale_jet.jpg) */ - COLORMAP_JET(opencv_imgproc.COLORMAP_JET), /** ![winter](pics/colormaps/colorscale_winter.jpg) */ - COLORMAP_WINTER(opencv_imgproc.COLORMAP_WINTER), /** ![rainbow](pics/colormaps/colorscale_rainbow.jpg) */ - COLORMAP_RAINBOW(opencv_imgproc.COLORMAP_RAINBOW), /** ![ocean](pics/colormaps/colorscale_ocean.jpg) */ - COLORMAP_OCEAN(opencv_imgproc.COLORMAP_OCEAN), /** ![summer](pics/colormaps/colorscale_summer.jpg) */ - COLORMAP_SUMMER(opencv_imgproc.COLORMAP_SUMMER), /** ![spring](pics/colormaps/colorscale_spring.jpg) */ - COLORMAP_SPRING(opencv_imgproc.COLORMAP_SPRING), /** ![cool](pics/colormaps/colorscale_cool.jpg) */ - COLORMAP_COOL(opencv_imgproc.COLORMAP_COOL), /** ![HSV](pics/colormaps/colorscale_hsv.jpg) */ - COLORMAP_HSV(opencv_imgproc.COLORMAP_HSV), /** ![pink](pics/colormaps/colorscale_pink.jpg) */ - COLORMAP_PINK(opencv_imgproc.COLORMAP_PINK), /** ![hot](pics/colormaps/colorscale_hot.jpg) */ - COLORMAP_HOT(opencv_imgproc.COLORMAP_HOT), /** ![hot](pics/colormaps/colorscale_parula.jpg) */ - COLORMAP_PARULA(opencv_imgproc.COLORMAP_PARULA); + /** + * ![autumn](pics/colormaps/colorscale_autumn.jpg) + */ + COLORMAP_AUTUMN(opencv_imgproc.COLORMAP_AUTUMN), + /** + * ![bone](pics/colormaps/colorscale_bone.jpg) + */ + COLORMAP_BONE(opencv_imgproc.COLORMAP_BONE), + /** + * ![jet](pics/colormaps/colorscale_jet.jpg) + */ + COLORMAP_JET(opencv_imgproc.COLORMAP_JET), + /** + * ![winter](pics/colormaps/colorscale_winter.jpg) + */ + COLORMAP_WINTER(opencv_imgproc.COLORMAP_WINTER), + /** + * ![rainbow](pics/colormaps/colorscale_rainbow.jpg) + */ + COLORMAP_RAINBOW(opencv_imgproc.COLORMAP_RAINBOW), + /** + * ![ocean](pics/colormaps/colorscale_ocean.jpg) + */ + COLORMAP_OCEAN(opencv_imgproc.COLORMAP_OCEAN), + /** + * ![summer](pics/colormaps/colorscale_summer.jpg) + */ + COLORMAP_SUMMER(opencv_imgproc.COLORMAP_SUMMER), + /** + * ![spring](pics/colormaps/colorscale_spring.jpg) + */ + COLORMAP_SPRING(opencv_imgproc.COLORMAP_SPRING), + /** + * ![cool](pics/colormaps/colorscale_cool.jpg) + */ + COLORMAP_COOL(opencv_imgproc.COLORMAP_COOL), + /** + * ![HSV](pics/colormaps/colorscale_hsv.jpg) + */ + COLORMAP_HSV(opencv_imgproc.COLORMAP_HSV), + /** + * ![pink](pics/colormaps/colorscale_pink.jpg) + */ + COLORMAP_PINK(opencv_imgproc.COLORMAP_PINK), + /** + * ![hot](pics/colormaps/colorscale_hot.jpg) + */ + COLORMAP_HOT(opencv_imgproc.COLORMAP_HOT), + /** + * ![hot](pics/colormaps/colorscale_parula.jpg) + */ + COLORMAP_PARULA(opencv_imgproc.COLORMAP_PARULA); - public final int value; + public final int value; - ColormapTypesEnum(int value) { - this.value = value; - } + ColormapTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ConnectedComponentsTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ConnectedComponentsTypesEnum.java index 8edf06a551..78b6354d3a 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ConnectedComponentsTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ConnectedComponentsTypesEnum.java @@ -1,21 +1,35 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum ConnectedComponentsTypesEnum { - /** The leftmost (x) coordinate which is the inclusive start of the bounding - * box in the horizontal direction. */ - CC_STAT_LEFT(opencv_imgproc.CC_STAT_LEFT), /** The topmost (y) coordinate which is the inclusive start of the bounding - * box in the vertical direction. */ - CC_STAT_TOP(opencv_imgproc.CC_STAT_TOP), /** The horizontal size of the bounding box */ - CC_STAT_WIDTH(opencv_imgproc.CC_STAT_WIDTH), /** The vertical size of the bounding box */ - CC_STAT_HEIGHT(opencv_imgproc.CC_STAT_HEIGHT), /** The total area (in pixels) of the connected component */ - CC_STAT_AREA(opencv_imgproc.CC_STAT_AREA), CC_STAT_MAX(opencv_imgproc.CC_STAT_MAX); + /** + * The leftmost (x) coordinate which is the inclusive start of the bounding box in the horizontal + * direction. + */ + CC_STAT_LEFT(opencv_imgproc.CC_STAT_LEFT), + /** + * The topmost (y) coordinate which is the inclusive start of the bounding box in the vertical + * direction. + */ + CC_STAT_TOP(opencv_imgproc.CC_STAT_TOP), + /** + * The horizontal size of the bounding box + */ + CC_STAT_WIDTH(opencv_imgproc.CC_STAT_WIDTH), + /** + * The vertical size of the bounding box + */ + CC_STAT_HEIGHT(opencv_imgproc.CC_STAT_HEIGHT), + /** + * The total area (in pixels) of the connected component + */ + CC_STAT_AREA(opencv_imgproc.CC_STAT_AREA), CC_STAT_MAX(opencv_imgproc.CC_STAT_MAX); - public final int value; + public final int value; - ConnectedComponentsTypesEnum(int value) { - this.value = value; - } + ConnectedComponentsTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ContourApproximationModesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ContourApproximationModesEnum.java index 615fc2ae30..fb087fb3cc 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ContourApproximationModesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ContourApproximationModesEnum.java @@ -1,21 +1,32 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum ContourApproximationModesEnum { - /** stores absolutely all the contour points. That is, any 2 subsequent points (x1,y1) and - (x2,y2) of the contour will be either horizontal, vertical or diagonal neighbors, that is, - max(abs(x1-x2),abs(y2-y1))==1. */ - CHAIN_APPROX_NONE(opencv_imgproc.CHAIN_APPROX_NONE), /** compresses horizontal, vertical, and diagonal segments and leaves only their end points. - For example, an up-right rectangular contour is encoded with 4 points. */ - CHAIN_APPROX_SIMPLE(opencv_imgproc.CHAIN_APPROX_SIMPLE), /** applies one of the flavors of the Teh-Chin chain approximation algorithm @cite TehChin89 */ - CHAIN_APPROX_TC89_L1(opencv_imgproc.CHAIN_APPROX_TC89_L1), /** applies one of the flavors of the Teh-Chin chain approximation algorithm @cite TehChin89 */ - CHAIN_APPROX_TC89_KCOS(opencv_imgproc.CHAIN_APPROX_TC89_KCOS); + /** + * stores absolutely all the contour points. That is, any 2 subsequent points (x1,y1) and (x2,y2) + * of the contour will be either horizontal, vertical or diagonal neighbors, that is, + * max(abs(x1-x2),abs(y2-y1))==1. + */ + CHAIN_APPROX_NONE(opencv_imgproc.CHAIN_APPROX_NONE), + /** + * compresses horizontal, vertical, and diagonal segments and leaves only their end points. For + * example, an up-right rectangular contour is encoded with 4 points. + */ + CHAIN_APPROX_SIMPLE(opencv_imgproc.CHAIN_APPROX_SIMPLE), + /** + * applies one of the flavors of the Teh-Chin chain approximation algorithm @cite TehChin89 + */ + CHAIN_APPROX_TC89_L1(opencv_imgproc.CHAIN_APPROX_TC89_L1), + /** + * applies one of the flavors of the Teh-Chin chain approximation algorithm @cite TehChin89 + */ + CHAIN_APPROX_TC89_KCOS(opencv_imgproc.CHAIN_APPROX_TC89_KCOS); - public final int value; + public final int value; - ContourApproximationModesEnum(int value) { - this.value = value; - } + ContourApproximationModesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTransformLabelTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTransformLabelTypesEnum.java index c428021659..f52935e268 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTransformLabelTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTransformLabelTypesEnum.java @@ -1,17 +1,22 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum DistanceTransformLabelTypesEnum { - /** each connected component of zeros in src (as well as all the non-zero pixels closest to the - connected component) will be assigned the same label */ - DIST_LABEL_CCOMP(opencv_imgproc.DIST_LABEL_CCOMP), /** each zero pixel (and all the non-zero pixels closest to it) gets its own label. */ - DIST_LABEL_PIXEL(opencv_imgproc.DIST_LABEL_PIXEL); + /** + * each connected component of zeros in src (as well as all the non-zero pixels closest to the + * connected component) will be assigned the same label + */ + DIST_LABEL_CCOMP(opencv_imgproc.DIST_LABEL_CCOMP), + /** + * each zero pixel (and all the non-zero pixels closest to it) gets its own label. + */ + DIST_LABEL_PIXEL(opencv_imgproc.DIST_LABEL_PIXEL); - public final int value; + public final int value; - DistanceTransformLabelTypesEnum(int value) { - this.value = value; - } + DistanceTransformLabelTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTransformMasksEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTransformMasksEnum.java index b3ffd5b8c7..0bad1390d2 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTransformMasksEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTransformMasksEnum.java @@ -1,16 +1,21 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum DistanceTransformMasksEnum { - /** mask=3 */ - DIST_MASK_3(opencv_imgproc.DIST_MASK_3), /** mask=5 */ - DIST_MASK_5(opencv_imgproc.DIST_MASK_5), DIST_MASK_PRECISE(opencv_imgproc.DIST_MASK_PRECISE); + /** + * mask=3 + */ + DIST_MASK_3(opencv_imgproc.DIST_MASK_3), + /** + * mask=5 + */ + DIST_MASK_5(opencv_imgproc.DIST_MASK_5), DIST_MASK_PRECISE(opencv_imgproc.DIST_MASK_PRECISE); - public final int value; + public final int value; - DistanceTransformMasksEnum(int value) { - this.value = value; - } + DistanceTransformMasksEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTypesEnum.java index b26519f6f4..6e08846724 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/DistanceTypesEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum DistanceTypesEnum { - DIST_USER(opencv_imgproc.DIST_USER), DIST_L1(opencv_imgproc.DIST_L1), DIST_L2(opencv_imgproc.DIST_L2), DIST_C(opencv_imgproc.DIST_C), DIST_L12(opencv_imgproc.DIST_L12), DIST_FAIR(opencv_imgproc.DIST_FAIR), DIST_WELSCH(opencv_imgproc.DIST_WELSCH), DIST_HUBER(opencv_imgproc.DIST_HUBER); + DIST_USER(opencv_imgproc.DIST_USER), DIST_L1(opencv_imgproc.DIST_L1), DIST_L2(opencv_imgproc.DIST_L2), DIST_C(opencv_imgproc.DIST_C), DIST_L12(opencv_imgproc.DIST_L12), DIST_FAIR(opencv_imgproc.DIST_FAIR), DIST_WELSCH(opencv_imgproc.DIST_WELSCH), DIST_HUBER(opencv_imgproc.DIST_HUBER); - public final int value; + public final int value; - DistanceTypesEnum(int value) { - this.value = value; - } + DistanceTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/FloodFillFlagsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/FloodFillFlagsEnum.java index 6d874b73a2..c50e11f63a 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/FloodFillFlagsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/FloodFillFlagsEnum.java @@ -1,19 +1,24 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum FloodFillFlagsEnum { - /** If set, the difference between the current pixel and seed pixel is considered. Otherwise, - the difference between neighbor pixels is considered (that is, the range is floating). */ - FLOODFILL_FIXED_RANGE(opencv_imgproc.FLOODFILL_FIXED_RANGE), /** If set, the function does not change the image ( newVal is ignored), and only fills the - mask with the value specified in bits 8-16 of flags as described above. This option only make - sense in function variants that have the mask parameter. */ - FLOODFILL_MASK_ONLY(opencv_imgproc.FLOODFILL_MASK_ONLY); + /** + * If set, the difference between the current pixel and seed pixel is considered. Otherwise, the + * difference between neighbor pixels is considered (that is, the range is floating). + */ + FLOODFILL_FIXED_RANGE(opencv_imgproc.FLOODFILL_FIXED_RANGE), + /** + * If set, the function does not change the image ( newVal is ignored), and only fills the mask + * with the value specified in bits 8-16 of flags as described above. This option only make sense + * in function variants that have the mask parameter. + */ + FLOODFILL_MASK_ONLY(opencv_imgproc.FLOODFILL_MASK_ONLY); - public final int value; + public final int value; - FloodFillFlagsEnum(int value) { - this.value = value; - } + FloodFillFlagsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/GrabCutClassesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/GrabCutClassesEnum.java index f71a30f3e8..2f4bdbe0fd 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/GrabCutClassesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/GrabCutClassesEnum.java @@ -1,18 +1,29 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum GrabCutClassesEnum { - /** an obvious background pixels */ - GC_BGD(opencv_imgproc.GC_BGD), /** an obvious foreground (object) pixel */ - GC_FGD(opencv_imgproc.GC_FGD), /** a possible background pixel */ - GC_PR_BGD(opencv_imgproc.GC_PR_BGD), /** a possible foreground pixel */ - GC_PR_FGD(opencv_imgproc.GC_PR_FGD); + /** + * an obvious background pixels + */ + GC_BGD(opencv_imgproc.GC_BGD), + /** + * an obvious foreground (object) pixel + */ + GC_FGD(opencv_imgproc.GC_FGD), + /** + * a possible background pixel + */ + GC_PR_BGD(opencv_imgproc.GC_PR_BGD), + /** + * a possible foreground pixel + */ + GC_PR_FGD(opencv_imgproc.GC_PR_FGD); - public final int value; + public final int value; - GrabCutClassesEnum(int value) { - this.value = value; - } + GrabCutClassesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/GrabCutModesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/GrabCutModesEnum.java index 23e0bbcc2f..bebcfa397c 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/GrabCutModesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/GrabCutModesEnum.java @@ -1,20 +1,28 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum GrabCutModesEnum { - /** The function initializes the state and the mask using the provided rectangle. After that it - runs iterCount iterations of the algorithm. */ - GC_INIT_WITH_RECT(opencv_imgproc.GC_INIT_WITH_RECT), /** The function initializes the state using the provided mask. Note that GC_INIT_WITH_RECT - and GC_INIT_WITH_MASK can be combined. Then, all the pixels outside of the ROI are - automatically initialized with GC_BGD .*/ - GC_INIT_WITH_MASK(opencv_imgproc.GC_INIT_WITH_MASK), /** The value means that the algorithm should just resume. */ - GC_EVAL(opencv_imgproc.GC_EVAL); + /** + * The function initializes the state and the mask using the provided rectangle. After that it + * runs iterCount iterations of the algorithm. + */ + GC_INIT_WITH_RECT(opencv_imgproc.GC_INIT_WITH_RECT), + /** + * The function initializes the state using the provided mask. Note that GC_INIT_WITH_RECT and + * GC_INIT_WITH_MASK can be combined. Then, all the pixels outside of the ROI are automatically + * initialized with GC_BGD . + */ + GC_INIT_WITH_MASK(opencv_imgproc.GC_INIT_WITH_MASK), + /** + * The value means that the algorithm should just resume. + */ + GC_EVAL(opencv_imgproc.GC_EVAL); - public final int value; + public final int value; - GrabCutModesEnum(int value) { - this.value = value; - } + GrabCutModesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/HistCompMethodsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/HistCompMethodsEnum.java index 15333facb1..1bf006281d 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/HistCompMethodsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/HistCompMethodsEnum.java @@ -1,32 +1,46 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum HistCompMethodsEnum { - /** Correlation - \f[d(H_1,H_2) = \frac{\sum_I (H_1(I) - \bar{H_1}) (H_2(I) - \bar{H_2})}{\sqrt{\sum_I(H_1(I) - \bar{H_1})^2 \sum_I(H_2(I) - \bar{H_2})^2}}\f] - where - \f[\bar{H_k} = \frac{1}{N} \sum _J H_k(J)\f] - and \f$N\f$ is a total number of histogram bins. */ - HISTCMP_CORREL(opencv_imgproc.HISTCMP_CORREL), /** Chi-Square - \f[d(H_1,H_2) = \sum _I \frac{\left(H_1(I)-H_2(I)\right)^2}{H_1(I)}\f] */ - HISTCMP_CHISQR(opencv_imgproc.HISTCMP_CHISQR), /** Intersection - \f[d(H_1,H_2) = \sum _I \min (H_1(I), H_2(I))\f] */ - HISTCMP_INTERSECT(opencv_imgproc.HISTCMP_INTERSECT), /** Bhattacharyya distance - (In fact, OpenCV computes Hellinger distance, which is related to Bhattacharyya coefficient.) - \f[d(H_1,H_2) = \sqrt{1 - \frac{1}{\sqrt{\bar{H_1} \bar{H_2} N^2}} \sum_I \sqrt{H_1(I) \cdot H_2(I)}}\f] */ - HISTCMP_BHATTACHARYYA(opencv_imgproc.HISTCMP_BHATTACHARYYA), /** Synonym for HISTCMP_BHATTACHARYYA */ - HISTCMP_HELLINGER(opencv_imgproc.HISTCMP_HELLINGER), /** Alternative Chi-Square - \f[d(H_1,H_2) = 2 * \sum _I \frac{\left(H_1(I)-H_2(I)\right)^2}{H_1(I)+H_2(I)}\f] - This alternative formula is regularly used for texture comparison. See e.g. @cite Puzicha1997 */ - HISTCMP_CHISQR_ALT(opencv_imgproc.HISTCMP_CHISQR_ALT), /** Kullback-Leibler divergence - \f[d(H_1,H_2) = \sum _I H_1(I) \log \left(\frac{H_1(I)}{H_2(I)}\right)\f] */ - HISTCMP_KL_DIV(opencv_imgproc.HISTCMP_KL_DIV); + /** + * Correlation \f[d(H_1,H_2) = \frac{\sum_I (H_1(I) - \bar{H_1}) (H_2(I) - + * \bar{H_2})}{\sqrt{\sum_I(H_1(I) - \bar{H_1})^2 \sum_I(H_2(I) - \bar{H_2})^2}}\f] where + * \f[\bar{H_k} = \frac{1}{N} \sum _J H_k(J)\f] and \f$N\f$ is a total number of histogram bins. + */ + HISTCMP_CORREL(opencv_imgproc.HISTCMP_CORREL), + /** + * Chi-Square \f[d(H_1,H_2) = \sum _I \frac{\left(H_1(I)-H_2(I)\right)^2}{H_1(I)}\f] + */ + HISTCMP_CHISQR(opencv_imgproc.HISTCMP_CHISQR), + /** + * Intersection \f[d(H_1,H_2) = \sum _I \min (H_1(I), H_2(I))\f] + */ + HISTCMP_INTERSECT(opencv_imgproc.HISTCMP_INTERSECT), + /** + * Bhattacharyya distance (In fact, OpenCV computes Hellinger distance, which is related to + * Bhattacharyya coefficient.) \f[d(H_1,H_2) = \sqrt{1 - \frac{1}{\sqrt{\bar{H_1} \bar{H_2} N^2}} + * \sum_I \sqrt{H_1(I) \cdot H_2(I)}}\f] + */ + HISTCMP_BHATTACHARYYA(opencv_imgproc.HISTCMP_BHATTACHARYYA), + /** + * Synonym for HISTCMP_BHATTACHARYYA + */ + HISTCMP_HELLINGER(opencv_imgproc.HISTCMP_HELLINGER), + /** + * Alternative Chi-Square \f[d(H_1,H_2) = 2 * \sum _I \frac{\left(H_1(I)-H_2(I)\right)^2}{H_1(I)+H_2(I)}\f] + * This alternative formula is regularly used for texture comparison. See e.g. @cite Puzicha1997 + */ + HISTCMP_CHISQR_ALT(opencv_imgproc.HISTCMP_CHISQR_ALT), + /** + * Kullback-Leibler divergence \f[d(H_1,H_2) = \sum _I H_1(I) \log \left(\frac{H_1(I)}{H_2(I)}\right)\f] + */ + HISTCMP_KL_DIV(opencv_imgproc.HISTCMP_KL_DIV); - public final int value; + public final int value; - HistCompMethodsEnum(int value) { - this.value = value; - } + HistCompMethodsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/HoughModesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/HoughModesEnum.java index 26346ddb2d..bc19d50d8b 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/HoughModesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/HoughModesEnum.java @@ -1,25 +1,36 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum HoughModesEnum { - /** classical or standard Hough transform. Every line is represented by two floating-point - numbers \f$(\rho, \theta)\f$ , where \f$\rho\f$ is a distance between (0,0) point and the line, - and \f$\theta\f$ is the angle between x-axis and the normal to the line. Thus, the matrix must - be (the created sequence will be) of CV_32FC2 type */ - HOUGH_STANDARD(opencv_imgproc.HOUGH_STANDARD), /** probabilistic Hough transform (more efficient in case if the picture contains a few long - linear segments). It returns line segments rather than the whole line. Each segment is - represented by starting and ending points, and the matrix must be (the created sequence will - be) of the CV_32SC4 type. */ - HOUGH_PROBABILISTIC(opencv_imgproc.HOUGH_PROBABILISTIC), /** multi-scale variant of the classical Hough transform. The lines are encoded the same way as - HOUGH_STANDARD. */ - HOUGH_MULTI_SCALE(opencv_imgproc.HOUGH_MULTI_SCALE), /** basically *21HT*, described in @cite Yuen90 */ - HOUGH_GRADIENT(opencv_imgproc.HOUGH_GRADIENT); + /** + * classical or standard Hough transform. Every line is represented by two floating-point numbers + * \f$(\rho, \theta)\f$ , where \f$\rho\f$ is a distance between (0,0) point and the line, and + * \f$\theta\f$ is the angle between x-axis and the normal to the line. Thus, the matrix must be + * (the created sequence will be) of CV_32FC2 type + */ + HOUGH_STANDARD(opencv_imgproc.HOUGH_STANDARD), + /** + * probabilistic Hough transform (more efficient in case if the picture contains a few long linear + * segments). It returns line segments rather than the whole line. Each segment is represented by + * starting and ending points, and the matrix must be (the created sequence will be) of the + * CV_32SC4 type. + */ + HOUGH_PROBABILISTIC(opencv_imgproc.HOUGH_PROBABILISTIC), + /** + * multi-scale variant of the classical Hough transform. The lines are encoded the same way as + * HOUGH_STANDARD. + */ + HOUGH_MULTI_SCALE(opencv_imgproc.HOUGH_MULTI_SCALE), + /** + * basically *21HT*, described in @cite Yuen90 + */ + HOUGH_GRADIENT(opencv_imgproc.HOUGH_GRADIENT); - public final int value; + public final int value; - HoughModesEnum(int value) { - this.value = value; - } + HoughModesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/InterpolationFlagsEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/InterpolationFlagsEnum.java index a3fc552559..a0115fb263 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/InterpolationFlagsEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/InterpolationFlagsEnum.java @@ -1,30 +1,51 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum InterpolationFlagsEnum { - /** nearest neighbor interpolation */ - INTER_NEAREST(opencv_imgproc.INTER_NEAREST), /** bilinear interpolation */ - INTER_LINEAR(opencv_imgproc.INTER_LINEAR), /** bicubic interpolation */ - INTER_CUBIC(opencv_imgproc.INTER_CUBIC), /** resampling using pixel area relation. It may be a preferred method for image decimation, as - it gives moire'-free results. But when the image is zoomed, it is similar to the INTER_NEAREST - method. */ - INTER_AREA(opencv_imgproc.INTER_AREA), /** Lanczos interpolation over 8x8 neighborhood */ - INTER_LANCZOS4(opencv_imgproc.INTER_LANCZOS4), /** mask for interpolation codes */ - INTER_MAX(opencv_imgproc.INTER_MAX), /** flag, fills all of the destination image pixels. If some of them correspond to outliers in the - source image, they are set to zero */ - WARP_FILL_OUTLIERS(opencv_imgproc.WARP_FILL_OUTLIERS), /** flag, inverse transformation + /** + * nearest neighbor interpolation + */ + INTER_NEAREST(opencv_imgproc.INTER_NEAREST), + /** + * bilinear interpolation + */ + INTER_LINEAR(opencv_imgproc.INTER_LINEAR), + /** + * bicubic interpolation + */ + INTER_CUBIC(opencv_imgproc.INTER_CUBIC), + /** + * resampling using pixel area relation. It may be a preferred method for image decimation, as it + * gives moire'-free results. But when the image is zoomed, it is similar to the INTER_NEAREST + * method. + */ + INTER_AREA(opencv_imgproc.INTER_AREA), + /** + * Lanczos interpolation over 8x8 neighborhood + */ + INTER_LANCZOS4(opencv_imgproc.INTER_LANCZOS4), + /** + * mask for interpolation codes + */ + INTER_MAX(opencv_imgproc.INTER_MAX), + /** + * flag, fills all of the destination image pixels. If some of them correspond to outliers in the + * source image, they are set to zero + */ + WARP_FILL_OUTLIERS(opencv_imgproc.WARP_FILL_OUTLIERS), + /** + * flag, inverse transformation + *

+ * For example, polar transforms: - flag is __not__ set: \f$dst( \phi , \rho ) = src(x,y)\f$ - + * flag is set: \f$dst(x,y) = src( \phi , \rho )\f$ + */ + WARP_INVERSE_MAP(opencv_imgproc.WARP_INVERSE_MAP); - For example, polar transforms: - - flag is __not__ set: \f$dst( \phi , \rho ) = src(x,y)\f$ - - flag is set: \f$dst(x,y) = src( \phi , \rho )\f$ - */ - WARP_INVERSE_MAP(opencv_imgproc.WARP_INVERSE_MAP); + public final int value; - public final int value; - - InterpolationFlagsEnum(int value) { - this.value = value; - } + InterpolationFlagsEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/InterpolationMasksEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/InterpolationMasksEnum.java index 55ef93011d..085bb9ad78 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/InterpolationMasksEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/InterpolationMasksEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum InterpolationMasksEnum { - INTER_BITS(opencv_imgproc.INTER_BITS), INTER_BITS2(opencv_imgproc.INTER_BITS2), INTER_TAB_SIZE(opencv_imgproc.INTER_TAB_SIZE), INTER_TAB_SIZE2(opencv_imgproc.INTER_TAB_SIZE2); + INTER_BITS(opencv_imgproc.INTER_BITS), INTER_BITS2(opencv_imgproc.INTER_BITS2), INTER_TAB_SIZE(opencv_imgproc.INTER_TAB_SIZE), INTER_TAB_SIZE2(opencv_imgproc.INTER_TAB_SIZE2); - public final int value; + public final int value; - InterpolationMasksEnum(int value) { - this.value = value; - } + InterpolationMasksEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/LineSegmentDetectorModesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/LineSegmentDetectorModesEnum.java index 37a6059ded..adca7c68eb 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/LineSegmentDetectorModesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/LineSegmentDetectorModesEnum.java @@ -1,18 +1,27 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum LineSegmentDetectorModesEnum { - /** No refinement applied */ - LSD_REFINE_NONE(opencv_imgproc.LSD_REFINE_NONE), /** Standard refinement is applied. E.g. breaking arches into smaller straighter line approximations. */ - LSD_REFINE_STD(opencv_imgproc.LSD_REFINE_STD), /** Advanced refinement. Number of false alarms is calculated, lines are - * refined through increase of precision, decrement in size, etc. */ - LSD_REFINE_ADV(opencv_imgproc.LSD_REFINE_ADV); + /** + * No refinement applied + */ + LSD_REFINE_NONE(opencv_imgproc.LSD_REFINE_NONE), + /** + * Standard refinement is applied. E.g. breaking arches into smaller straighter line + * approximations. + */ + LSD_REFINE_STD(opencv_imgproc.LSD_REFINE_STD), + /** + * Advanced refinement. Number of false alarms is calculated, lines are refined through increase + * of precision, decrement in size, etc. + */ + LSD_REFINE_ADV(opencv_imgproc.LSD_REFINE_ADV); - public final int value; + public final int value; - LineSegmentDetectorModesEnum(int value) { - this.value = value; - } + LineSegmentDetectorModesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/MorphShapesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/MorphShapesEnum.java index 7380f9c26b..b112b61ee9 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/MorphShapesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/MorphShapesEnum.java @@ -1,19 +1,27 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum MorphShapesEnum { - /** a rectangular structuring element: \f[E_{ij}=1\f] */ - MORPH_RECT(opencv_imgproc.MORPH_RECT), /** a cross-shaped structuring element: - * \f[E_{ij} = \fork{1}{if i=\texttt{anchor.y} or j=\texttt{anchor.x}}{0}{otherwise}\f] */ - MORPH_CROSS(opencv_imgproc.MORPH_CROSS), /** an elliptic structuring element, that is, a filled ellipse inscribed - * into the rectangle Rect(0, 0, esize.width, 0.esize.height) */ - MORPH_ELLIPSE(opencv_imgproc.MORPH_ELLIPSE); + /** + * a rectangular structuring element: \f[E_{ij}=1\f] + */ + MORPH_RECT(opencv_imgproc.MORPH_RECT), + /** + * a cross-shaped structuring element: \f[E_{ij} = \fork{1}{if i=\texttt{anchor.y} or + * j=\texttt{anchor.x}}{0}{otherwise}\f] + */ + MORPH_CROSS(opencv_imgproc.MORPH_CROSS), + /** + * an elliptic structuring element, that is, a filled ellipse inscribed into the rectangle Rect(0, + * 0, esize.width, 0.esize.height) + */ + MORPH_ELLIPSE(opencv_imgproc.MORPH_ELLIPSE); - public final int value; + public final int value; - MorphShapesEnum(int value) { - this.value = value; - } + MorphShapesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/MorphTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/MorphTypesEnum.java index f70613769f..2b75c18238 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/MorphTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/MorphTypesEnum.java @@ -1,26 +1,47 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum MorphTypesEnum { - /** see cv::erode */ - MORPH_ERODE(opencv_imgproc.MORPH_ERODE), /** see cv::dilate */ - MORPH_DILATE(opencv_imgproc.MORPH_DILATE), /** an opening operation - * \f[\texttt{dst} = \mathrm{open} ( \texttt{src} , \texttt{element} )= \mathrm{dilate} ( \mathrm{erode} ( \texttt{src} , \texttt{element} ))\f] */ - MORPH_OPEN(opencv_imgproc.MORPH_OPEN), /** a closing operation - * \f[\texttt{dst} = \mathrm{close} ( \texttt{src} , \texttt{element} )= \mathrm{erode} ( \mathrm{dilate} ( \texttt{src} , \texttt{element} ))\f] */ - MORPH_CLOSE(opencv_imgproc.MORPH_CLOSE), /** a morphological gradient - * \f[\texttt{dst} = \mathrm{morph\_grad} ( \texttt{src} , \texttt{element} )= \mathrm{dilate} ( \texttt{src} , \texttt{element} )- \mathrm{erode} ( \texttt{src} , \texttt{element} )\f] */ - MORPH_GRADIENT(opencv_imgproc.MORPH_GRADIENT), /** "top hat" - * \f[\texttt{dst} = \mathrm{tophat} ( \texttt{src} , \texttt{element} )= \texttt{src} - \mathrm{open} ( \texttt{src} , \texttt{element} )\f] */ - MORPH_TOPHAT(opencv_imgproc.MORPH_TOPHAT), /** "black hat" - * \f[\texttt{dst} = \mathrm{blackhat} ( \texttt{src} , \texttt{element} )= \mathrm{close} ( \texttt{src} , \texttt{element} )- \texttt{src}\f] */ - MORPH_BLACKHAT(opencv_imgproc.MORPH_BLACKHAT); + /** + * see cv::erode + */ + MORPH_ERODE(opencv_imgproc.MORPH_ERODE), + /** + * see cv::dilate + */ + MORPH_DILATE(opencv_imgproc.MORPH_DILATE), + /** + * an opening operation \f[\texttt{dst} = \mathrm{open} ( \texttt{src} , \texttt{element} )= + * \mathrm{dilate} ( \mathrm{erode} ( \texttt{src} , \texttt{element} ))\f] + */ + MORPH_OPEN(opencv_imgproc.MORPH_OPEN), + /** + * a closing operation \f[\texttt{dst} = \mathrm{close} ( \texttt{src} , \texttt{element} )= + * \mathrm{erode} ( \mathrm{dilate} ( \texttt{src} , \texttt{element} ))\f] + */ + MORPH_CLOSE(opencv_imgproc.MORPH_CLOSE), + /** + * a morphological gradient \f[\texttt{dst} = \mathrm{morph\_grad} ( \texttt{src} , + * \texttt{element} )= \mathrm{dilate} ( \texttt{src} , \texttt{element} )- \mathrm{erode} ( + * \texttt{src} , \texttt{element} )\f] + */ + MORPH_GRADIENT(opencv_imgproc.MORPH_GRADIENT), + /** + * "top hat" \f[\texttt{dst} = \mathrm{tophat} ( \texttt{src} , \texttt{element} )= \texttt{src} - + * \mathrm{open} ( \texttt{src} , \texttt{element} )\f] + */ + MORPH_TOPHAT(opencv_imgproc.MORPH_TOPHAT), + /** + * "black hat" \f[\texttt{dst} = \mathrm{blackhat} ( \texttt{src} , \texttt{element} )= + * \mathrm{close} ( \texttt{src} , \texttt{element} )- \texttt{src}\f] + */ + MORPH_BLACKHAT(opencv_imgproc.MORPH_BLACKHAT); - public final int value; + public final int value; - MorphTypesEnum(int value) { - this.value = value; - } + MorphTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/RectanglesIntersectTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/RectanglesIntersectTypesEnum.java index 7e15ff2c2e..36d428d114 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/RectanglesIntersectTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/RectanglesIntersectTypesEnum.java @@ -1,17 +1,25 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum RectanglesIntersectTypesEnum { - /** No intersection */ - INTERSECT_NONE(opencv_imgproc.INTERSECT_NONE), /** There is a partial intersection */ - INTERSECT_PARTIAL(opencv_imgproc.INTERSECT_PARTIAL), /** One of the rectangle is fully enclosed in the other */ - INTERSECT_FULL(opencv_imgproc.INTERSECT_FULL); + /** + * No intersection + */ + INTERSECT_NONE(opencv_imgproc.INTERSECT_NONE), + /** + * There is a partial intersection + */ + INTERSECT_PARTIAL(opencv_imgproc.INTERSECT_PARTIAL), + /** + * One of the rectangle is fully enclosed in the other + */ + INTERSECT_FULL(opencv_imgproc.INTERSECT_FULL); - public final int value; + public final int value; - RectanglesIntersectTypesEnum(int value) { - this.value = value; - } + RectanglesIntersectTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/RetrievalModesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/RetrievalModesEnum.java index cadca9b3d3..fc358532ab 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/RetrievalModesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/RetrievalModesEnum.java @@ -1,22 +1,33 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum RetrievalModesEnum { - /** retrieves only the extreme outer contours. It sets `hierarchy[i][2]=hierarchy[i][3]=-1` for - all the contours. */ - RETR_EXTERNAL(opencv_imgproc.RETR_EXTERNAL), /** retrieves all of the contours without establishing any hierarchical relationships. */ - RETR_LIST(opencv_imgproc.RETR_LIST), /** retrieves all of the contours and organizes them into a two-level hierarchy. At the top - level, there are external boundaries of the components. At the second level, there are - boundaries of the holes. If there is another contour inside a hole of a connected component, it - is still put at the top level. */ - RETR_CCOMP(opencv_imgproc.RETR_CCOMP), /** retrieves all of the contours and reconstructs a full hierarchy of nested contours.*/ - RETR_TREE(opencv_imgproc.RETR_TREE), RETR_FLOODFILL(opencv_imgproc.RETR_FLOODFILL); + /** + * retrieves only the extreme outer contours. It sets `hierarchy[i][2]=hierarchy[i][3]=-1` for all + * the contours. + */ + RETR_EXTERNAL(opencv_imgproc.RETR_EXTERNAL), + /** + * retrieves all of the contours without establishing any hierarchical relationships. + */ + RETR_LIST(opencv_imgproc.RETR_LIST), + /** + * retrieves all of the contours and organizes them into a two-level hierarchy. At the top level, + * there are external boundaries of the components. At the second level, there are boundaries of + * the holes. If there is another contour inside a hole of a connected component, it is still put + * at the top level. + */ + RETR_CCOMP(opencv_imgproc.RETR_CCOMP), + /** + * retrieves all of the contours and reconstructs a full hierarchy of nested contours. + */ + RETR_TREE(opencv_imgproc.RETR_TREE), RETR_FLOODFILL(opencv_imgproc.RETR_FLOODFILL); - public final int value; + public final int value; - RetrievalModesEnum(int value) { - this.value = value; - } + RetrievalModesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/SubdivEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/SubdivEnum.java index 89885217da..bfac42dc6b 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/SubdivEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/SubdivEnum.java @@ -1,14 +1,14 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.opencv_imgproc.Subdiv2D; public enum SubdivEnum { - PTLOC_ERROR(opencv_imgproc.Subdiv2D.PTLOC_ERROR), PTLOC_OUTSIDE_RECT(opencv_imgproc.Subdiv2D.PTLOC_OUTSIDE_RECT), PTLOC_INSIDE(opencv_imgproc.Subdiv2D.PTLOC_INSIDE), PTLOC_VERTEX(opencv_imgproc.Subdiv2D.PTLOC_VERTEX), PTLOC_ON_EDGE(opencv_imgproc.Subdiv2D.PTLOC_ON_EDGE), NEXT_AROUND_ORG(opencv_imgproc.Subdiv2D.NEXT_AROUND_ORG), NEXT_AROUND_DST(opencv_imgproc.Subdiv2D.NEXT_AROUND_DST), PREV_AROUND_ORG(opencv_imgproc.Subdiv2D.PREV_AROUND_ORG), PREV_AROUND_DST(opencv_imgproc.Subdiv2D.PREV_AROUND_DST), NEXT_AROUND_LEFT(opencv_imgproc.Subdiv2D.NEXT_AROUND_LEFT), NEXT_AROUND_RIGHT(opencv_imgproc.Subdiv2D.NEXT_AROUND_RIGHT), PREV_AROUND_LEFT(opencv_imgproc.Subdiv2D.PREV_AROUND_LEFT), PREV_AROUND_RIGHT(opencv_imgproc.Subdiv2D.PREV_AROUND_RIGHT); + PTLOC_ERROR(Subdiv2D.PTLOC_ERROR), PTLOC_OUTSIDE_RECT(Subdiv2D.PTLOC_OUTSIDE_RECT), PTLOC_INSIDE(Subdiv2D.PTLOC_INSIDE), PTLOC_VERTEX(Subdiv2D.PTLOC_VERTEX), PTLOC_ON_EDGE(Subdiv2D.PTLOC_ON_EDGE), NEXT_AROUND_ORG(Subdiv2D.NEXT_AROUND_ORG), NEXT_AROUND_DST(Subdiv2D.NEXT_AROUND_DST), PREV_AROUND_ORG(Subdiv2D.PREV_AROUND_ORG), PREV_AROUND_DST(Subdiv2D.PREV_AROUND_DST), NEXT_AROUND_LEFT(Subdiv2D.NEXT_AROUND_LEFT), NEXT_AROUND_RIGHT(Subdiv2D.NEXT_AROUND_RIGHT), PREV_AROUND_LEFT(Subdiv2D.PREV_AROUND_LEFT), PREV_AROUND_RIGHT(Subdiv2D.PREV_AROUND_RIGHT); - public final int value; + public final int value; - SubdivEnum(int value) { - this.value = value; - } + SubdivEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/TemplateMatchModesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/TemplateMatchModesEnum.java index dc26ba8e3d..7b67271575 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/TemplateMatchModesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/TemplateMatchModesEnum.java @@ -1,22 +1,43 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum TemplateMatchModesEnum { - /** \f[R(x,y)= \sum _{x',y'} (T(x',y')-I(x+x',y+y'))^2\f] */ - TM_SQDIFF(opencv_imgproc.TM_SQDIFF), /** \f[R(x,y)= \frac{\sum_{x',y'} (T(x',y')-I(x+x',y+y'))^2}{\sqrt{\sum_{x',y'}T(x',y')^2 \cdot \sum_{x',y'} I(x+x',y+y')^2}}\f] */ - TM_SQDIFF_NORMED(opencv_imgproc.TM_SQDIFF_NORMED), /** \f[R(x,y)= \sum _{x',y'} (T(x',y') \cdot I(x+x',y+y'))\f] */ - TM_CCORR(opencv_imgproc.TM_CCORR), /** \f[R(x,y)= \frac{\sum_{x',y'} (T(x',y') \cdot I(x+x',y+y'))}{\sqrt{\sum_{x',y'}T(x',y')^2 \cdot \sum_{x',y'} I(x+x',y+y')^2}}\f] */ - TM_CCORR_NORMED(opencv_imgproc.TM_CCORR_NORMED), /** \f[R(x,y)= \sum _{x',y'} (T'(x',y') \cdot I'(x+x',y+y'))\f] - * where - * \f[\begin{array}{l} T'(x',y')=T(x',y') - 1/(w \cdot h) \cdot \sum _{x'',y''} T(x'',y'') \\ I'(x+x',y+y')=I(x+x',y+y') - 1/(w \cdot h) \cdot \sum _{x'',y''} I(x+x'',y+y'') \end{array}\f] */ - TM_CCOEFF(opencv_imgproc.TM_CCOEFF), /** \f[R(x,y)= \frac{ \sum_{x',y'} (T'(x',y') \cdot I'(x+x',y+y')) }{ \sqrt{\sum_{x',y'}T'(x',y')^2 \cdot \sum_{x',y'} I'(x+x',y+y')^2} }\f] */ - TM_CCOEFF_NORMED(opencv_imgproc.TM_CCOEFF_NORMED); + /** + * \f[R(x,y)= \sum _{x',y'} (T(x',y')-I(x+x',y+y'))^2\f] + */ + TM_SQDIFF(opencv_imgproc.TM_SQDIFF), + /** + * \f[R(x,y)= \frac{\sum_{x',y'} (T(x',y')-I(x+x',y+y'))^2}{\sqrt{\sum_{x',y'}T(x',y')^2 \cdot + * \sum_{x',y'} I(x+x',y+y')^2}}\f] + */ + TM_SQDIFF_NORMED(opencv_imgproc.TM_SQDIFF_NORMED), + /** + * \f[R(x,y)= \sum _{x',y'} (T(x',y') \cdot I(x+x',y+y'))\f] + */ + TM_CCORR(opencv_imgproc.TM_CCORR), + /** + * \f[R(x,y)= \frac{\sum_{x',y'} (T(x',y') \cdot I(x+x',y+y'))}{\sqrt{\sum_{x',y'}T(x',y')^2 \cdot + * \sum_{x',y'} I(x+x',y+y')^2}}\f] + */ + TM_CCORR_NORMED(opencv_imgproc.TM_CCORR_NORMED), + /** + * \f[R(x,y)= \sum _{x',y'} (T'(x',y') \cdot I'(x+x',y+y'))\f] where \f[\begin{array}{l} + * T'(x',y')=T(x',y') - 1/(w \cdot h) \cdot \sum _{x'',y''} T(x'',y'') \\ + * I'(x+x',y+y')=I(x+x',y+y') - 1/(w \cdot h) \cdot \sum _{x'',y''} I(x+x'',y+y'') + * \end{array}\f] + */ + TM_CCOEFF(opencv_imgproc.TM_CCOEFF), + /** + * \f[R(x,y)= \frac{ \sum_{x',y'} (T'(x',y') \cdot I'(x+x',y+y')) }{ \sqrt{\sum_{x',y'}T'(x',y')^2 + * \cdot \sum_{x',y'} I'(x+x',y+y')^2} }\f] + */ + TM_CCOEFF_NORMED(opencv_imgproc.TM_CCOEFF_NORMED); - public final int value; + public final int value; - TemplateMatchModesEnum(int value) { - this.value = value; - } + TemplateMatchModesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ThresholdTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ThresholdTypesEnum.java index 5dec96e549..115960fe04 100644 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ThresholdTypesEnum.java +++ b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/ThresholdTypesEnum.java @@ -1,21 +1,44 @@ package edu.wpi.grip.generated.opencv_imgproc.enumeration; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_imgproc; public enum ThresholdTypesEnum { - /** \f[\texttt{dst} (x,y) = \fork{\texttt{maxval}}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{0}{otherwise}\f] */ - THRESH_BINARY(opencv_imgproc.THRESH_BINARY), /** \f[\texttt{dst} (x,y) = \fork{0}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{\texttt{maxval}}{otherwise}\f] */ - THRESH_BINARY_INV(opencv_imgproc.THRESH_BINARY_INV), /** \f[\texttt{dst} (x,y) = \fork{\texttt{threshold}}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{\texttt{src}(x,y)}{otherwise}\f] */ - THRESH_TRUNC(opencv_imgproc.THRESH_TRUNC), /** \f[\texttt{dst} (x,y) = \fork{\texttt{src}(x,y)}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{0}{otherwise}\f] */ - THRESH_TOZERO(opencv_imgproc.THRESH_TOZERO), /** \f[\texttt{dst} (x,y) = \fork{0}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{\texttt{src}(x,y)}{otherwise}\f] */ - THRESH_TOZERO_INV(opencv_imgproc.THRESH_TOZERO_INV), THRESH_MASK(opencv_imgproc.THRESH_MASK), /** flag, use Otsu algorithm to choose the optimal threshold value */ - THRESH_OTSU(opencv_imgproc.THRESH_OTSU), /** flag, use Triangle algorithm to choose the optimal threshold value */ - THRESH_TRIANGLE(opencv_imgproc.THRESH_TRIANGLE); + /** + * \f[\texttt{dst} (x,y) = \fork{\texttt{maxval}}{if \(\texttt{src}(x,y) > + * \texttt{thresh}\)}{0}{otherwise}\f] + */ + THRESH_BINARY(opencv_imgproc.THRESH_BINARY), + /** + * \f[\texttt{dst} (x,y) = \fork{0}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{\texttt{maxval}}{otherwise}\f] + */ + THRESH_BINARY_INV(opencv_imgproc.THRESH_BINARY_INV), + /** + * \f[\texttt{dst} (x,y) = \fork{\texttt{threshold}}{if \(\texttt{src}(x,y) > + * \texttt{thresh}\)}{\texttt{src}(x,y)}{otherwise}\f] + */ + THRESH_TRUNC(opencv_imgproc.THRESH_TRUNC), + /** + * \f[\texttt{dst} (x,y) = \fork{\texttt{src}(x,y)}{if \(\texttt{src}(x,y) > + * \texttt{thresh}\)}{0}{otherwise}\f] + */ + THRESH_TOZERO(opencv_imgproc.THRESH_TOZERO), + /** + * \f[\texttt{dst} (x,y) = \fork{0}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{\texttt{src}(x,y)}{otherwise}\f] + */ + THRESH_TOZERO_INV(opencv_imgproc.THRESH_TOZERO_INV), THRESH_MASK(opencv_imgproc.THRESH_MASK), + /** + * flag, use Otsu algorithm to choose the optimal threshold value + */ + THRESH_OTSU(opencv_imgproc.THRESH_OTSU), + /** + * flag, use Triangle algorithm to choose the optimal threshold value + */ + THRESH_TRIANGLE(opencv_imgproc.THRESH_TRIANGLE); - public final int value; + public final int value; - ThresholdTypesEnum(int value) { - this.value = value; - } + ThresholdTypesEnum(int value) { + this.value = value; + } } diff --git a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/UndistortTypesEnum.java b/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/UndistortTypesEnum.java deleted file mode 100644 index e1fdfc4244..0000000000 --- a/core/src/main/java/edu/wpi/grip/generated/opencv_imgproc/enumeration/UndistortTypesEnum.java +++ /dev/null @@ -1,14 +0,0 @@ -package edu.wpi.grip.generated.opencv_imgproc.enumeration; - -import org.bytedeco.javacpp.opencv_imgproc; - -public enum UndistortTypesEnum { - - PROJ_SPHERICAL_ORTHO(opencv_imgproc.PROJ_SPHERICAL_ORTHO), PROJ_SPHERICAL_EQRECT(opencv_imgproc.PROJ_SPHERICAL_EQRECT); - - public final int value; - - UndistortTypesEnum(int value) { - this.value = value; - } -} diff --git a/core/src/test/java/edu/wpi/grip/core/AddOperation.java b/core/src/test/java/edu/wpi/grip/core/AddOperation.java index 7d1775ae69..4bb1b74ae1 100644 --- a/core/src/test/java/edu/wpi/grip/core/AddOperation.java +++ b/core/src/test/java/edu/wpi/grip/core/AddOperation.java @@ -10,7 +10,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.eventbus.EventBus; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; import java.util.List; diff --git a/core/src/test/java/edu/wpi/grip/core/metrics/TimerTest.java b/core/src/test/java/edu/wpi/grip/core/metrics/TimerTest.java index e13e14cfdc..84f5f429ac 100644 --- a/core/src/test/java/edu/wpi/grip/core/metrics/TimerTest.java +++ b/core/src/test/java/edu/wpi/grip/core/metrics/TimerTest.java @@ -83,7 +83,8 @@ public void testTime() { public void testTimeThrowsException() { Timer timer = new Timer(eventBus, this); timer.started(); - timer.time(() -> { }); + timer.time(() -> { + }); fail("An exception should have been thrown"); } diff --git a/core/src/test/java/edu/wpi/grip/core/operations/opencv/AddOperationTest.java b/core/src/test/java/edu/wpi/grip/core/operations/opencv/AddOperationTest.java index cf802536ef..addb34284c 100644 --- a/core/src/test/java/edu/wpi/grip/core/operations/opencv/AddOperationTest.java +++ b/core/src/test/java/edu/wpi/grip/core/operations/opencv/AddOperationTest.java @@ -7,9 +7,9 @@ import com.google.common.eventbus.EventBus; -import org.bytedeco.javacpp.opencv_core; -import org.bytedeco.javacpp.opencv_core.Mat; -import org.bytedeco.javacpp.opencv_core.Scalar; +import org.bytedeco.opencv.global.opencv_core; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Scalar; import org.junit.Before; import org.junit.Test; diff --git a/core/src/test/java/edu/wpi/grip/core/serialization/ProjectTest.java b/core/src/test/java/edu/wpi/grip/core/serialization/ProjectTest.java index 01313abe33..1693af4e87 100644 --- a/core/src/test/java/edu/wpi/grip/core/serialization/ProjectTest.java +++ b/core/src/test/java/edu/wpi/grip/core/serialization/ProjectTest.java @@ -29,6 +29,8 @@ import com.google.inject.TypeLiteral; import com.google.inject.util.Modules; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Scalar; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -40,12 +42,10 @@ import static junit.framework.Assert.assertNotNull; import static junit.framework.TestCase.assertEquals; -import static org.bytedeco.javacpp.opencv_core.CMP_NE; -import static org.bytedeco.javacpp.opencv_core.CV_32F; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.Scalar; -import static org.bytedeco.javacpp.opencv_core.compare; -import static org.bytedeco.javacpp.opencv_core.countNonZero; +import static org.bytedeco.opencv.global.opencv_core.CMP_NE; +import static org.bytedeco.opencv.global.opencv_core.CV_32F; +import static org.bytedeco.opencv.global.opencv_core.compare; +import static org.bytedeco.opencv.global.opencv_core.countNonZero; public class ProjectTest { diff --git a/core/src/test/java/edu/wpi/grip/core/sources/CameraSourceTest.java b/core/src/test/java/edu/wpi/grip/core/sources/CameraSourceTest.java index 903ff66819..aa42537d4b 100644 --- a/core/src/test/java/edu/wpi/grip/core/sources/CameraSourceTest.java +++ b/core/src/test/java/edu/wpi/grip/core/sources/CameraSourceTest.java @@ -23,10 +23,10 @@ import net.jodah.concurrentunit.Waiter; import org.bytedeco.javacpp.indexer.Indexer; -import org.bytedeco.javacpp.opencv_core.Mat; import org.bytedeco.javacv.Frame; import org.bytedeco.javacv.FrameGrabber; import org.bytedeco.javacv.OpenCVFrameConverter; +import org.bytedeco.opencv.opencv_core.Mat; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -71,7 +71,7 @@ public void setUp() throws Exception { final EventBus eventBus = new EventBus(); class UnhandledExceptionWitness { @SuppressFBWarnings(value = "UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS", - justification = "This method is called by Guava's EventBus") + justification = "This method is called by Guava's EventBus") @Subscribe public void onUnexpectedThrowableEvent(UnexpectedThrowableEvent event) { event.handleSafely((throwable, message, isFatal) -> { diff --git a/core/src/test/java/edu/wpi/grip/core/sources/GrabberServiceTest.java b/core/src/test/java/edu/wpi/grip/core/sources/GrabberServiceTest.java index 3f751f7ac6..f887127581 100644 --- a/core/src/test/java/edu/wpi/grip/core/sources/GrabberServiceTest.java +++ b/core/src/test/java/edu/wpi/grip/core/sources/GrabberServiceTest.java @@ -1,9 +1,9 @@ package edu.wpi.grip.core.sources; -import org.bytedeco.javacpp.opencv_core.Mat; import org.bytedeco.javacv.Frame; import org.bytedeco.javacv.FrameGrabber; import org.bytedeco.javacv.OpenCVFrameConverter; +import org.bytedeco.opencv.opencv_core.Mat; import org.junit.Test; import java.util.function.Supplier; @@ -49,7 +49,7 @@ public void testStartUpRethrowsConstructorException() throws GrabberService fail("This should have thrown an exception"); } catch (IllegalStateException e) { assertThat(e).hasMessageThat() - .contains(ConstructorThrowingFrameGrabber.CONSTRUCTOR_EXCEPTION_MESSAGE); + .contains(ConstructorThrowingFrameGrabber.CONSTRUCTOR_EXCEPTION_MESSAGE); throw e; } fail("This should have rethrown an exception"); @@ -202,17 +202,17 @@ public void updatesComplete() { private static class SimpleUpdater implements CameraSourceUpdater { @Override public void setFrameRate(double value) { - /* no-op */ + /* no-op */ } @Override public void copyNewMat(Mat matToCopy) { - /* no-op */ + /* no-op */ } @Override public void updatesComplete() { - /* no-op */ + /* no-op */ } } diff --git a/core/src/test/java/edu/wpi/grip/core/sources/MockNumberSource.java b/core/src/test/java/edu/wpi/grip/core/sources/MockNumberSource.java index 98f2790a09..063c37f810 100644 --- a/core/src/test/java/edu/wpi/grip/core/sources/MockNumberSource.java +++ b/core/src/test/java/edu/wpi/grip/core/sources/MockNumberSource.java @@ -15,11 +15,11 @@ import java.util.Properties; public class MockNumberSource extends Source { - + private static int numberOf = 0; private final int id; private final OutputSocket outputSocket; - private final SocketHint outputSocketHint = + private final SocketHint outputSocketHint = SocketHints.Outputs.createNumberSocketHint("Num", Math.PI); @SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", @@ -39,7 +39,7 @@ public String getName() { @Override protected List createOutputSockets() { return ImmutableList.of( - outputSocket + outputSocket ); } diff --git a/core/src/test/java/edu/wpi/grip/core/sources/SimpleMockFrameGrabber.java b/core/src/test/java/edu/wpi/grip/core/sources/SimpleMockFrameGrabber.java index 14c78952d3..da0d04a72e 100644 --- a/core/src/test/java/edu/wpi/grip/core/sources/SimpleMockFrameGrabber.java +++ b/core/src/test/java/edu/wpi/grip/core/sources/SimpleMockFrameGrabber.java @@ -8,17 +8,17 @@ class SimpleMockFrameGrabber extends FrameGrabber { @Override public void start() throws Exception { - /* no-op */ + /* no-op */ } @Override public void stop() throws Exception { - /* no-op */ + /* no-op */ } @Override public void trigger() throws Exception { - /* no-op */ + /* no-op */ } @Override @@ -28,6 +28,6 @@ public Frame grab() throws Exception { @Override public void release() throws Exception { - /* no-op */ + /* no-op */ } } diff --git a/core/src/test/java/edu/wpi/grip/core/util/service/AutoRestartingServiceTest.java b/core/src/test/java/edu/wpi/grip/core/util/service/AutoRestartingServiceTest.java index b9c109922c..cb1dadc43d 100644 --- a/core/src/test/java/edu/wpi/grip/core/util/service/AutoRestartingServiceTest.java +++ b/core/src/test/java/edu/wpi/grip/core/util/service/AutoRestartingServiceTest.java @@ -33,9 +33,8 @@ /** * Many of these mock service objects are copied from Guava's test framework. * - * @see - * Original - * Guava Tests + * @see Original + * Guava Tests */ public class AutoRestartingServiceTest { private CountDownLatch enterRun; @@ -149,8 +148,8 @@ public void testServiceStaysRunningIfThrowOnRunning() throws InterruptedExceptio final AutoRestartingService restartingService = new AutoRestartingService<>(recordingSupplier, ServiceRestartPolicy.IMMEDIATE); - @SuppressWarnings("PMD.PrematureDeclaration") - final Service initialDelegate = restartingService.getDelegate(); + @SuppressWarnings("PMD.PrematureDeclaration") final Service initialDelegate + = restartingService.getDelegate(); try { // This waits for this instance of the service to be terminated diff --git a/core/src/test/java/edu/wpi/grip/util/ImageWithData.java b/core/src/test/java/edu/wpi/grip/util/ImageWithData.java index 40b66ff3ef..5b40d0e83e 100644 --- a/core/src/test/java/edu/wpi/grip/util/ImageWithData.java +++ b/core/src/test/java/edu/wpi/grip/util/ImageWithData.java @@ -4,7 +4,7 @@ import edu.wpi.grip.core.MatWrapper; import edu.wpi.grip.core.util.ImageLoadingUtility; -import org.bytedeco.javacpp.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Mat; import java.io.File; import java.io.IOException; diff --git a/core/src/test/java/edu/wpi/grip/util/MultiException.java b/core/src/test/java/edu/wpi/grip/util/MultiException.java index a19a06c229..d40f3eaf3b 100644 --- a/core/src/test/java/edu/wpi/grip/util/MultiException.java +++ b/core/src/test/java/edu/wpi/grip/util/MultiException.java @@ -19,7 +19,8 @@ private MultiException(int size, Iterator exceptions) { } /** - * Given a collection of exceptions, returns a {@link RuntimeException}, with the following rules: + * Given a collection of exceptions, returns a {@link RuntimeException}, with the following + * rules: *

  • If {@code exceptions} has a single exception and that exception is a {@link * RuntimeException}, return it
  • If {@code exceptions} has a single exceptions and that * exceptions is not a {@link RuntimeException}, return a simple {@code RuntimeException} diff --git a/ui/preloader/src/main/java/edu/wpi/grip/preloader/HexagonGrid.java b/ui/preloader/src/main/java/edu/wpi/grip/preloader/HexagonGrid.java index 85f50db275..30b172bc3d 100644 --- a/ui/preloader/src/main/java/edu/wpi/grip/preloader/HexagonGrid.java +++ b/ui/preloader/src/main/java/edu/wpi/grip/preloader/HexagonGrid.java @@ -35,8 +35,8 @@ public HexagonGrid(int cols, int rows, double radius, double padding) { } /** - * Gets the hexagons in the grid. Do not apply any transforms to the hexagons; they are already - * in the correct locations and orientations. + * Gets the hexagons in the grid. Do not apply any transforms to the hexagons; they are already in + * the correct locations and orientations. */ public Collection hexagons() { return getChildren().stream() diff --git a/ui/preloader/src/main/java/edu/wpi/grip/preloader/Launch.java b/ui/preloader/src/main/java/edu/wpi/grip/preloader/Launch.java index e9a15dec42..a30bc0fc77 100644 --- a/ui/preloader/src/main/java/edu/wpi/grip/preloader/Launch.java +++ b/ui/preloader/src/main/java/edu/wpi/grip/preloader/Launch.java @@ -9,8 +9,8 @@ private Launch() { /** * Main entry point for launching GRIP. We use an explicit main method in a separate class to - * allow the JavaFX application to be launched without needing to go through the JVM's - * module reflection (which fails when JavaFX is not on the module path - i.e. ALWAYS). + * allow the JavaFX application to be launched without needing to go through the JVM's module + * reflection (which fails when JavaFX is not on the module path - i.e. ALWAYS). */ public static void main(String[] args) { // JavaFX 11+ uses GTK3 by default, and has problems on some display servers diff --git a/ui/src/main/java/edu/wpi/grip/ui/AboutDialogController.java b/ui/src/main/java/edu/wpi/grip/ui/AboutDialogController.java index b1cf38fa2c..0e9f28ad11 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/AboutDialogController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/AboutDialogController.java @@ -2,7 +2,6 @@ import javafx.fxml.FXML; import javafx.scene.control.Label; - import javax.inject.Inject; public class AboutDialogController { diff --git a/ui/src/main/java/edu/wpi/grip/ui/DeployController.java b/ui/src/main/java/edu/wpi/grip/ui/DeployController.java index cca72adb8a..71977530f9 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/DeployController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/DeployController.java @@ -48,7 +48,6 @@ import javafx.scene.control.ProgressIndicator; import javafx.scene.control.TextField; import javafx.scene.control.ToggleButton; - import javax.inject.Inject; /** diff --git a/ui/src/main/java/edu/wpi/grip/ui/Launch.java b/ui/src/main/java/edu/wpi/grip/ui/Launch.java index e14961e47f..1f5cf77789 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/Launch.java +++ b/ui/src/main/java/edu/wpi/grip/ui/Launch.java @@ -11,8 +11,8 @@ private Launch() { /** * Main entry point for launching GRIP. We use an explicit main method in a separate class to - * allow the JavaFX application to be launched without needing to go through the JVM's - * module reflection (which fails when JavaFX is not on the module path - i.e. ALWAYS). + * allow the JavaFX application to be launched without needing to go through the JVM's module + * reflection (which fails when JavaFX is not on the module path - i.e. ALWAYS). * *

    This also allows us to specify GTK2 on Linux systems, since JavaFX defaults to GTK3 and * is thus broken on most distros. diff --git a/ui/src/main/java/edu/wpi/grip/ui/Main.java b/ui/src/main/java/edu/wpi/grip/ui/Main.java index 39a9558fba..8f5b5bd308 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/Main.java +++ b/ui/src/main/java/edu/wpi/grip/ui/Main.java @@ -44,7 +44,6 @@ import javafx.scene.image.Image; import javafx.scene.text.Font; import javafx.stage.Stage; - import javax.inject.Inject; public class Main extends Application { @@ -60,14 +59,22 @@ public class Main extends Application { */ @VisibleForTesting protected Injector injector; - @Inject private EventBus eventBus; - @Inject private PipelineRunner pipelineRunner; - @Inject private Project project; - @Inject private SettingsProvider settingsProvider; - @Inject private Operations operations; - @Inject private CVOperations cvOperations; - @Inject private GripServer server; - @Inject private HttpPipelineSwitcher pipelineSwitcher; + @Inject + private EventBus eventBus; + @Inject + private PipelineRunner pipelineRunner; + @Inject + private Project project; + @Inject + private SettingsProvider settingsProvider; + @Inject + private Operations operations; + @Inject + private CVOperations cvOperations; + @Inject + private GripServer server; + @Inject + private HttpPipelineSwitcher pipelineSwitcher; private Parent root; private boolean headless; private final UICommandLineHelper commandLineHelper = new UICommandLineHelper(); diff --git a/ui/src/main/java/edu/wpi/grip/ui/MainWindowController.java b/ui/src/main/java/edu/wpi/grip/ui/MainWindowController.java index 25630a71dd..a2b3a7f18d 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/MainWindowController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/MainWindowController.java @@ -53,7 +53,6 @@ import javafx.stage.FileChooser.ExtensionFilter; import javafx.stage.Stage; import javafx.stage.StageStyle; - import javax.inject.Inject; /** @@ -293,8 +292,8 @@ protected boolean quit() { } /** - * Controls the export button in the main menu. Opens a filechooser with language selection. - * The user can select the language to export to, save location and file name. + * Controls the export button in the main menu. Opens a filechooser with language selection. The + * user can select the language to export to, save location and file name. */ @FXML protected void generate() { diff --git a/ui/src/main/java/edu/wpi/grip/ui/OperationListController.java b/ui/src/main/java/edu/wpi/grip/ui/OperationListController.java index 05b64e6cc1..f0e4e8ae22 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/OperationListController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/OperationListController.java @@ -29,10 +29,14 @@ public class OperationListController { protected static final String FILTER_TEXT = "filterText"; private final StringProperty filterText = new SimpleStringProperty(this, FILTER_TEXT, ""); - @FXML private Tab root; - @FXML private VBox operations; - @Inject private OperationController.Factory operationControllerFactory; - @SuppressWarnings("PMD.SingularField") private String baseText = null; + @FXML + private Tab root; + @FXML + private VBox operations; + @Inject + private OperationController.Factory operationControllerFactory; + @SuppressWarnings("PMD.SingularField") + private String baseText = null; private ControllerMap operationsMapManager; @FXML diff --git a/ui/src/main/java/edu/wpi/grip/ui/PaletteController.java b/ui/src/main/java/edu/wpi/grip/ui/PaletteController.java index 8db74f0f60..db03fedd7e 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/PaletteController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/PaletteController.java @@ -13,7 +13,6 @@ import javafx.scene.control.Tab; import javafx.scene.control.TextField; import javafx.scene.layout.VBox; - import javax.inject.Singleton; /** @@ -22,15 +21,24 @@ @Singleton public class PaletteController { - @FXML private VBox root; - @FXML private CustomTextField operationSearch; - @FXML private Tab allOperations; - @FXML private Tab imgprocOperations; - @FXML private Tab featureOperations; - @FXML private Tab networkOperations; - @FXML private Tab logicalOperations; - @FXML private Tab opencvOperations; - @FXML private Tab miscellaneousOperations; + @FXML + private VBox root; + @FXML + private CustomTextField operationSearch; + @FXML + private Tab allOperations; + @FXML + private Tab imgprocOperations; + @FXML + private Tab featureOperations; + @FXML + private Tab networkOperations; + @FXML + private Tab logicalOperations; + @FXML + private Tab opencvOperations; + @FXML + private Tab miscellaneousOperations; @FXML protected void initialize() { diff --git a/ui/src/main/java/edu/wpi/grip/ui/WarningAlert.java b/ui/src/main/java/edu/wpi/grip/ui/WarningAlert.java index 09ae191558..0ee6d93afb 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/WarningAlert.java +++ b/ui/src/main/java/edu/wpi/grip/ui/WarningAlert.java @@ -17,10 +17,9 @@ public class WarningAlert extends Alert { * Creates a new warning alert. * * @param header the header text of the alert. This should be short and descriptive. - * @param body the body text of the alert. This should go into detail about the warning - * and what prompted it. + * @param body the body text of the alert. This should go into detail about the warning and what + * prompted it. * @param owner the owner window of this alert - * * @throws NullPointerException if any of the parameters are null */ public WarningAlert(String header, String body, Window owner) { diff --git a/ui/src/main/java/edu/wpi/grip/ui/analysis/AnalysisController.java b/ui/src/main/java/edu/wpi/grip/ui/analysis/AnalysisController.java index 0639cc4fe4..9b2fc7ff64 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/analysis/AnalysisController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/analysis/AnalysisController.java @@ -44,7 +44,6 @@ import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.util.Callback; - import javax.annotation.Nullable; /** diff --git a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/CodeGenerationOptionsController.java b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/CodeGenerationOptionsController.java index cfad2cce0f..d50c09b4f7 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/CodeGenerationOptionsController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/CodeGenerationOptionsController.java @@ -10,7 +10,7 @@ import com.google.common.eventbus.Subscribe; import com.google.inject.Inject; -import org.bytedeco.javacpp.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Mat; import java.io.File; import java.nio.file.Files; diff --git a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/CodeGenerationSettingsDialog.java b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/CodeGenerationSettingsDialog.java index e558fe260c..2417e3e74e 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/CodeGenerationSettingsDialog.java +++ b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/CodeGenerationSettingsDialog.java @@ -6,7 +6,6 @@ import javafx.scene.control.ButtonType; import javafx.scene.control.Dialog; import javafx.scene.layout.Pane; - import javax.annotation.Nonnull; import static com.google.common.base.Preconditions.checkArgument; diff --git a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/Exporter.java b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/Exporter.java index d70d492686..ca7f0eeec6 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/Exporter.java +++ b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/Exporter.java @@ -38,9 +38,8 @@ public class Exporter implements Runnable { private final boolean testing; /** - * Constructor for an exporter with testing option. - * In general for non grip testing, the version of the constructor - * without testing boolean should be called. + * Constructor for an exporter with testing option. In general for non grip testing, the version + * of the constructor without testing boolean should be called. * * @param steps an Immutable List of the steps in the pipeline to generate. * @param settings the settings to use for this export @@ -132,7 +131,6 @@ public Set getNonExportableStepNames() { * Checks if a step is exportable to this exporter's language. * * @param step the step to check - * * @return true if the given step can be exported to the current language; false if it can't */ private boolean isExportable(Step step) { diff --git a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/Language.java b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/Language.java index fae4b958d8..b714a21280 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/Language.java +++ b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/Language.java @@ -1,8 +1,8 @@ package edu.wpi.grip.ui.codegeneration; /** - * An enum representing code generation languages. - * Each language has a name as well as a directory for templates. + * An enum representing code generation languages. Each language has a name as well as a directory + * for templates. */ public enum Language { @@ -25,7 +25,6 @@ public enum Language { * returns {@code null}. * * @param name the language name to get the enum for. - * * @return the Language that represents the name. */ public static Language get(String name) { diff --git a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/TemplateMethods.java b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/TemplateMethods.java index 614e31e9e3..62d4e94b20 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/TemplateMethods.java +++ b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/TemplateMethods.java @@ -8,9 +8,9 @@ import edu.wpi.grip.ui.codegeneration.data.TStep; import org.apache.commons.lang3.text.WordUtils; -import org.bytedeco.javacpp.opencv_core.Point; -import org.bytedeco.javacpp.opencv_core.Scalar; -import org.bytedeco.javacpp.opencv_core.Size; +import org.bytedeco.opencv.opencv_core.Point; +import org.bytedeco.opencv.opencv_core.Scalar; +import org.bytedeco.opencv.opencv_core.Size; import java.nio.DoubleBuffer; import java.util.Optional; diff --git a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TInput.java b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TInput.java index 546b4ecaa3..44fd4fd00b 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TInput.java +++ b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TInput.java @@ -7,8 +7,9 @@ public class TInput extends TSocket { /** * creates a new TInput with an output - * @param type the type of the TInput. - * @param name the GRIP name of the TInput. + * + * @param type the type of the TInput. + * @param name the GRIP name of the TInput. * @param output the output the the TInput is connected to. */ public TInput(String type, String name, TOutput output) { @@ -18,8 +19,9 @@ public TInput(String type, String name, TOutput output) { /** * creates a new TInput with a preset value - * @param type the type of the TInput. - * @param name the GRIP name of the TInput. + * + * @param type the type of the TInput. + * @param name the GRIP name of the TInput. * @param value the preset value of the TInput represented as a string. */ public TInput(String type, String name, String value) { @@ -29,6 +31,7 @@ public TInput(String type, String name, String value) { /** * Gets the value of the output. + * * @return returns the value of the output in the form of a string. */ public String value() { @@ -58,6 +61,7 @@ protected String baseTypeHelper(String type) { /** * Checks to see if the input has a value + * * @return true if there is a value. false if it is null. */ public boolean hasValue() { diff --git a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TOutput.java b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TOutput.java index 397c2c6a7a..833bce311f 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TOutput.java +++ b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TOutput.java @@ -5,6 +5,7 @@ public class TOutput extends TSocket { /** * Constructor that creates a new template output socket. + * * @param type the type of the output. * @param name the name of the output. */ diff --git a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TPipeline.java b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TPipeline.java index 8012b92277..8ab8b5a607 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TPipeline.java +++ b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TPipeline.java @@ -16,8 +16,7 @@ import static edu.wpi.grip.annotation.operation.OperationCategory.NETWORK; /** - * TPipeline(template pipeline) is a data structure - * that holds the information about a pipeline + * TPipeline(template pipeline) is a data structure that holds the information about a pipeline * needed by the velocity templates to generate code. */ public class TPipeline { diff --git a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TSocket.java b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TSocket.java index 4284c922e3..35e5dda37d 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TSocket.java +++ b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TSocket.java @@ -9,6 +9,7 @@ public class TSocket { /** * The default constructor for a Socket. Assigns member variable to values. + * * @param type the type of the socket. eg: (String, Mat). * @param name the GRIP name of the socket. */ @@ -19,6 +20,7 @@ protected TSocket(String type, String name) { /** * Sets the type of the socket to a value. + * * @param type The new type of the socket */ public void setType(String type) { @@ -27,6 +29,7 @@ public void setType(String type) { /** * gets the type of the socket. + * * @return the type of the socket. */ public String type() { @@ -35,6 +38,7 @@ public String type() { /** * the String that represents the socket. + * * @return the name of the socket. */ public String name() { @@ -43,6 +47,7 @@ public String name() { /** * This checks if a step is mutable and returns the type. Used in Templates. + * * @return The type of the socket. */ public String baseType() { @@ -55,6 +60,7 @@ public String baseType() { /** * Can be overridden by a subclass. is overridden by TInput. + * * @param type the original type * @return the baseType */ @@ -64,6 +70,7 @@ protected String baseTypeHelper(String type) { /** * Checks to see if the socket is mutable. + * * @return true if mutable. false if not mutable. */ public boolean mutable() { @@ -73,6 +80,7 @@ public boolean mutable() { /** * checks to see if the socket is a number type. + * * @return true if it is a number. */ public boolean number() { diff --git a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TStep.java b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TStep.java index 1181849a6b..bff3056546 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TStep.java +++ b/ui/src/main/java/edu/wpi/grip/ui/codegeneration/data/TStep.java @@ -12,7 +12,8 @@ public class TStep { /** * This is a constructor for a Template step. - * @param name The name of the step. + * + * @param name The name of the step. * @param stepNum The number of the step in the pipeline. */ public TStep(String name, int stepNum) { @@ -24,6 +25,7 @@ public TStep(String name, int stepNum) { /** * Adds an already created TInput to a step. + * * @param input a TInput to be added */ public void addInput(TInput input) { @@ -32,6 +34,7 @@ public void addInput(TInput input) { /** * Adds an already created TOutput to a step. + * * @param output a TOutput to be added */ public void addOutput(TOutput output) { @@ -40,6 +43,7 @@ public void addOutput(TOutput output) { /** * gets the name of the step + * * @return the GRIP name of the step with underscores instead of spaces. */ public String name() { @@ -48,6 +52,7 @@ public String name() { /** * returns all of the inputs of a step. + * * @return all of the inputs of the step. */ public List getInputs() { @@ -56,6 +61,7 @@ public List getInputs() { /** * returns all of the Outputs of a step. + * * @return all of the Outputs of the step. */ public List getOutputs() { @@ -64,6 +70,7 @@ public List getOutputs() { /** * gets a specific Input for use in templates. + * * @param idx the index of the input. * @return the TOutput at the index. */ @@ -73,6 +80,7 @@ public TInput getInput(int idx) { /** * gets a specific Output for use in templates. + * * @param idx the index of the Output. * @return the TOutput at the index. */ @@ -82,6 +90,7 @@ public TOutput getOutput(int idx) { /** * The number of the step. Each different type of step is numbered separately. + * * @return the number of the step. */ public int num() { diff --git a/ui/src/main/java/edu/wpi/grip/ui/components/ExceptionWitnessResponderButton.java b/ui/src/main/java/edu/wpi/grip/ui/components/ExceptionWitnessResponderButton.java index 2ca2f59eef..baa26caaf9 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/components/ExceptionWitnessResponderButton.java +++ b/ui/src/main/java/edu/wpi/grip/ui/components/ExceptionWitnessResponderButton.java @@ -56,7 +56,7 @@ public final class ExceptionWitnessResponderButton extends Button { /** * @param origin The same origin that is passed to the - * {@link edu.wpi.grip.core.util.ExceptionWitness} + * {@link edu.wpi.grip.core.util.ExceptionWitness} */ @Inject ExceptionWitnessResponderButton(@Assisted Object origin, @Assisted String popOverTitle) { diff --git a/ui/src/main/java/edu/wpi/grip/ui/dragging/OperationDragService.java b/ui/src/main/java/edu/wpi/grip/ui/dragging/OperationDragService.java index 51a9ecb766..4a178bb445 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/dragging/OperationDragService.java +++ b/ui/src/main/java/edu/wpi/grip/ui/dragging/OperationDragService.java @@ -8,7 +8,7 @@ /** * Service for dragging an {@link Operation} from the - * {@link edu.wpi.grip.ui.pipeline.PipelineController} + * {@link edu.wpi.grip.ui.pipeline.PipelineController} * to the {@link edu.wpi.grip.ui.pipeline.PipelineController}. */ @Singleton diff --git a/ui/src/main/java/edu/wpi/grip/ui/pipeline/PipelineController.java b/ui/src/main/java/edu/wpi/grip/ui/pipeline/PipelineController.java index 6611f55f18..82c1936580 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/pipeline/PipelineController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/pipeline/PipelineController.java @@ -44,7 +44,6 @@ import javafx.scene.input.TransferMode; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; - import javax.annotation.Nullable; import javax.inject.Inject; diff --git a/ui/src/main/java/edu/wpi/grip/ui/pipeline/StepController.java b/ui/src/main/java/edu/wpi/grip/ui/pipeline/StepController.java index 13c0bd6978..febd050fd6 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/pipeline/StepController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/pipeline/StepController.java @@ -44,7 +44,6 @@ import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.util.Duration; - import javax.inject.Inject; /** diff --git a/ui/src/main/java/edu/wpi/grip/ui/pipeline/input/RangeInputSocketController.java b/ui/src/main/java/edu/wpi/grip/ui/pipeline/input/RangeInputSocketController.java index 4ad99a5e8e..9fafdb9c60 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/pipeline/input/RangeInputSocketController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/pipeline/input/RangeInputSocketController.java @@ -46,8 +46,7 @@ public class RangeInputSocketController extends InputSocketController extremes = (List) domain[0]; + @SuppressWarnings("unchecked") final List extremes = (List) domain[0]; checkArgument((extremes.size() == 2) && (extremes.get(0) instanceof Number) && (extremes.get(1) instanceof Number), "Sliders must have a domain with a list of two numbers (min and max)"); diff --git a/ui/src/main/java/edu/wpi/grip/ui/pipeline/input/TextFieldInputSocketController.java b/ui/src/main/java/edu/wpi/grip/ui/pipeline/input/TextFieldInputSocketController.java index 7d394fd518..b52f95f8de 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/pipeline/input/TextFieldInputSocketController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/pipeline/input/TextFieldInputSocketController.java @@ -10,7 +10,6 @@ import javafx.application.Platform; import javafx.fxml.FXML; import javafx.scene.control.TextField; - import javax.inject.Inject; /** diff --git a/ui/src/main/java/edu/wpi/grip/ui/pipeline/source/HttpSourceController.java b/ui/src/main/java/edu/wpi/grip/ui/pipeline/source/HttpSourceController.java index 9d65c99936..7ed2242fe6 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/pipeline/source/HttpSourceController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/pipeline/source/HttpSourceController.java @@ -1,4 +1,3 @@ - package edu.wpi.grip.ui.pipeline.source; import edu.wpi.grip.core.sources.HttpSource; diff --git a/ui/src/main/java/edu/wpi/grip/ui/pipeline/source/SourceControllerFactory.java b/ui/src/main/java/edu/wpi/grip/ui/pipeline/source/SourceControllerFactory.java index c4fdd428c4..78fec613c9 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/pipeline/source/SourceControllerFactory.java +++ b/ui/src/main/java/edu/wpi/grip/ui/pipeline/source/SourceControllerFactory.java @@ -35,7 +35,6 @@ public class SourceControllerFactory { * * @param source The source to create the view for * @param The type of the source - * * @return The appropriate SourceController. */ @SuppressWarnings("unchecked") diff --git a/ui/src/main/java/edu/wpi/grip/ui/preview/BlobsSocketPreviewView.java b/ui/src/main/java/edu/wpi/grip/ui/preview/BlobsSocketPreviewView.java index c35405981e..458fd25b85 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/preview/BlobsSocketPreviewView.java +++ b/ui/src/main/java/edu/wpi/grip/ui/preview/BlobsSocketPreviewView.java @@ -4,6 +4,10 @@ import edu.wpi.grip.core.sockets.OutputSocket; import edu.wpi.grip.ui.util.GripPlatform; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Point; +import org.bytedeco.opencv.opencv_core.Scalar; + import javafx.geometry.Orientation; import javafx.scene.control.CheckBox; import javafx.scene.control.Label; @@ -11,14 +15,11 @@ import javafx.scene.image.Image; import javafx.scene.layout.VBox; -import static org.bytedeco.javacpp.opencv_core.LINE_8; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.Point; -import static org.bytedeco.javacpp.opencv_core.Scalar; -import static org.bytedeco.javacpp.opencv_core.bitwise_xor; -import static org.bytedeco.javacpp.opencv_imgproc.CV_GRAY2BGR; -import static org.bytedeco.javacpp.opencv_imgproc.circle; -import static org.bytedeco.javacpp.opencv_imgproc.cvtColor; +import static org.bytedeco.opencv.global.opencv_core.bitwise_xor; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_GRAY2BGR; +import static org.bytedeco.opencv.global.opencv_imgproc.LINE_8; +import static org.bytedeco.opencv.global.opencv_imgproc.circle; +import static org.bytedeco.opencv.global.opencv_imgproc.cvtColor; /** * A SocketPreviewView for BlobsReports that shows the original image with circles overlayed onto @@ -62,6 +63,8 @@ protected void convertImage() { if (input.channels() == 3) { input.copyTo(tmp); + } else if (input.channels() == 0) { + System.exit(input.size().height()); } else { cvtColor(input, tmp, CV_GRAY2BGR); } diff --git a/ui/src/main/java/edu/wpi/grip/ui/preview/ContoursSocketPreviewView.java b/ui/src/main/java/edu/wpi/grip/ui/preview/ContoursSocketPreviewView.java index a08eec6e07..72d850178a 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/preview/ContoursSocketPreviewView.java +++ b/ui/src/main/java/edu/wpi/grip/ui/preview/ContoursSocketPreviewView.java @@ -4,16 +4,17 @@ import edu.wpi.grip.core.sockets.OutputSocket; import edu.wpi.grip.ui.util.GripPlatform; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Scalar; + import javafx.scene.control.CheckBox; import javafx.scene.control.Label; import javafx.scene.image.Image; import javafx.scene.layout.VBox; -import static org.bytedeco.javacpp.opencv_core.CV_8UC3; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.Scalar; -import static org.bytedeco.javacpp.opencv_core.bitwise_xor; -import static org.bytedeco.javacpp.opencv_imgproc.drawContours; +import static org.bytedeco.opencv.global.opencv_core.CV_8UC3; +import static org.bytedeco.opencv.global.opencv_core.bitwise_xor; +import static org.bytedeco.opencv.global.opencv_imgproc.drawContours; /** * A preview view for displaying contours. This view shows each contour as a different-colored diff --git a/ui/src/main/java/edu/wpi/grip/ui/preview/ImageBasedPreviewView.java b/ui/src/main/java/edu/wpi/grip/ui/preview/ImageBasedPreviewView.java index 41cff86b0e..cdf768006f 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/preview/ImageBasedPreviewView.java +++ b/ui/src/main/java/edu/wpi/grip/ui/preview/ImageBasedPreviewView.java @@ -9,8 +9,8 @@ import javafx.application.Platform; -import static org.bytedeco.javacpp.opencv_core.CV_8S; -import static org.bytedeco.javacpp.opencv_core.CV_8U; +import static org.bytedeco.opencv.global.opencv_core.CV_8S; +import static org.bytedeco.opencv.global.opencv_core.CV_8U; /** * Base class for image previews. @@ -45,7 +45,6 @@ protected ImageBasedPreviewView(OutputSocket socket) { * Checks if an image is able to be previewed. * * @param image the image to check - * * @return true if the image can be previewed, false if it can't */ public static boolean isPreviewable(MatWrapper image) { diff --git a/ui/src/main/java/edu/wpi/grip/ui/preview/LinesSocketPreviewView.java b/ui/src/main/java/edu/wpi/grip/ui/preview/LinesSocketPreviewView.java index dda8876081..17fe209d65 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/preview/LinesSocketPreviewView.java +++ b/ui/src/main/java/edu/wpi/grip/ui/preview/LinesSocketPreviewView.java @@ -5,6 +5,10 @@ import edu.wpi.grip.ui.util.GripPlatform; import edu.wpi.grip.ui.util.ImageConverter; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Point; +import org.bytedeco.opencv.opencv_core.Scalar; + import java.util.List; import javafx.geometry.Orientation; @@ -15,15 +19,12 @@ import javafx.scene.image.ImageView; import javafx.scene.layout.VBox; -import static org.bytedeco.javacpp.opencv_core.LINE_8; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.Point; -import static org.bytedeco.javacpp.opencv_core.Scalar; -import static org.bytedeco.javacpp.opencv_core.bitwise_xor; -import static org.bytedeco.javacpp.opencv_imgproc.CV_GRAY2BGR; -import static org.bytedeco.javacpp.opencv_imgproc.circle; -import static org.bytedeco.javacpp.opencv_imgproc.cvtColor; -import static org.bytedeco.javacpp.opencv_imgproc.line; +import static org.bytedeco.opencv.global.opencv_core.bitwise_xor; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_GRAY2BGR; +import static org.bytedeco.opencv.global.opencv_imgproc.LINE_8; +import static org.bytedeco.opencv.global.opencv_imgproc.circle; +import static org.bytedeco.opencv.global.opencv_imgproc.cvtColor; +import static org.bytedeco.opencv.global.opencv_imgproc.line; /** * A SocketPreviewView that previews sockets containing containing the result of a line diff --git a/ui/src/main/java/edu/wpi/grip/ui/preview/PointSizeSocketPreviewView.java b/ui/src/main/java/edu/wpi/grip/ui/preview/PointSizeSocketPreviewView.java index 273ce18c63..41d012558c 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/preview/PointSizeSocketPreviewView.java +++ b/ui/src/main/java/edu/wpi/grip/ui/preview/PointSizeSocketPreviewView.java @@ -7,15 +7,14 @@ import com.google.common.eventbus.Subscribe; import org.bytedeco.javacpp.IntPointer; +import org.bytedeco.opencv.opencv_core.Point; +import org.bytedeco.opencv.opencv_core.Size; import javafx.application.Platform; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; -import static org.bytedeco.javacpp.opencv_core.Point; -import static org.bytedeco.javacpp.opencv_core.Size; - /** * A {@link SocketPreviewView} for OpenCV points and sizes. */ diff --git a/ui/src/main/java/edu/wpi/grip/ui/preview/PreviewsController.java b/ui/src/main/java/edu/wpi/grip/ui/preview/PreviewsController.java index eb7a596de5..39c9840023 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/preview/PreviewsController.java +++ b/ui/src/main/java/edu/wpi/grip/ui/preview/PreviewsController.java @@ -19,7 +19,6 @@ import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.scene.layout.HBox; - import javax.inject.Inject; import javax.inject.Singleton; diff --git a/ui/src/main/java/edu/wpi/grip/ui/preview/RectangleSocketPreviewView.java b/ui/src/main/java/edu/wpi/grip/ui/preview/RectangleSocketPreviewView.java index bc65a7d038..ec15f47611 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/preview/RectangleSocketPreviewView.java +++ b/ui/src/main/java/edu/wpi/grip/ui/preview/RectangleSocketPreviewView.java @@ -4,6 +4,10 @@ import edu.wpi.grip.core.sockets.OutputSocket; import edu.wpi.grip.ui.util.GripPlatform; +import org.bytedeco.opencv.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Rect; +import org.bytedeco.opencv.opencv_core.Scalar; + import java.util.List; import javafx.geometry.Orientation; @@ -13,14 +17,11 @@ import javafx.scene.image.Image; import javafx.scene.layout.VBox; -import static org.bytedeco.javacpp.opencv_core.LINE_8; -import static org.bytedeco.javacpp.opencv_core.Mat; -import static org.bytedeco.javacpp.opencv_core.Rect; -import static org.bytedeco.javacpp.opencv_core.Scalar; -import static org.bytedeco.javacpp.opencv_core.bitwise_xor; -import static org.bytedeco.javacpp.opencv_imgproc.CV_GRAY2BGR; -import static org.bytedeco.javacpp.opencv_imgproc.cvtColor; -import static org.bytedeco.javacpp.opencv_imgproc.rectangle; +import static org.bytedeco.opencv.global.opencv_core.bitwise_xor; +import static org.bytedeco.opencv.global.opencv_imgproc.CV_GRAY2BGR; +import static org.bytedeco.opencv.global.opencv_imgproc.LINE_8; +import static org.bytedeco.opencv.global.opencv_imgproc.cvtColor; +import static org.bytedeco.opencv.global.opencv_imgproc.rectangle; /** * Preview for a rectangle report socket. diff --git a/ui/src/main/java/edu/wpi/grip/ui/preview/SocketPreviewViewFactory.java b/ui/src/main/java/edu/wpi/grip/ui/preview/SocketPreviewViewFactory.java index 38a6b677d7..a55ce6b46e 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/preview/SocketPreviewViewFactory.java +++ b/ui/src/main/java/edu/wpi/grip/ui/preview/SocketPreviewViewFactory.java @@ -12,8 +12,8 @@ import com.google.inject.Inject; import com.google.inject.Singleton; -import static org.bytedeco.javacpp.opencv_core.Point; -import static org.bytedeco.javacpp.opencv_core.Size; +import org.bytedeco.opencv.opencv_core.Point; +import org.bytedeco.opencv.opencv_core.Size; /** diff --git a/ui/src/main/java/edu/wpi/grip/ui/preview/TitledPane.java b/ui/src/main/java/edu/wpi/grip/ui/preview/TitledPane.java index 9cb09dc02c..e0e86f68c5 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/preview/TitledPane.java +++ b/ui/src/main/java/edu/wpi/grip/ui/preview/TitledPane.java @@ -10,8 +10,8 @@ import javafx.scene.layout.StackPane; /** - * Custom implementation of a titled pane. The JavaFX implementation has a tendency to add a gap - * on the sides of image content when resized. + * Custom implementation of a titled pane. The JavaFX implementation has a tendency to add a gap on + * the sides of image content when resized. */ public class TitledPane extends BorderPane { diff --git a/ui/src/main/java/edu/wpi/grip/ui/util/ImageConverter.java b/ui/src/main/java/edu/wpi/grip/ui/util/ImageConverter.java index e90b8f8bef..60a63b32c5 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/util/ImageConverter.java +++ b/ui/src/main/java/edu/wpi/grip/ui/util/ImageConverter.java @@ -4,7 +4,7 @@ import com.google.common.primitives.UnsignedBytes; -import org.bytedeco.javacpp.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Mat; import java.nio.ByteBuffer; import java.nio.IntBuffer; @@ -14,8 +14,8 @@ import javafx.scene.image.PixelFormat; import javafx.scene.image.WritableImage; -import static org.bytedeco.javacpp.opencv_core.CV_8S; -import static org.bytedeco.javacpp.opencv_core.CV_8U; +import static org.bytedeco.opencv.global.opencv_core.CV_8S; +import static org.bytedeco.opencv.global.opencv_core.CV_8U; /** * Utility class for creating a JavaFX image from an OpenCV image. This used by the preview views @@ -36,8 +36,7 @@ public Image convert(MatWrapper wrapper) { * method involves several intermediate conversions ({@code Mat -> Frame -> BufferedImage -> * JavaFX Image}) and is way too slow to use for a real-time video. * - * @param mat An 8-bit OpenCV Mat containing an image with either 1 or 3 channels - * + * @param mat An 8-bit OpenCV Mat containing an image with either 1 or 3 channels * @return A JavaFX image, or null for empty */ public Image convert(Mat mat) { diff --git a/ui/src/main/java/edu/wpi/grip/ui/util/Spinners.java b/ui/src/main/java/edu/wpi/grip/ui/util/Spinners.java index 5819864ca0..eb858c5965 100644 --- a/ui/src/main/java/edu/wpi/grip/ui/util/Spinners.java +++ b/ui/src/main/java/edu/wpi/grip/ui/util/Spinners.java @@ -17,7 +17,7 @@ public final class Spinners { private Spinners() { - /* no-op */ + /* no-op */ } /** diff --git a/ui/src/main/resources/edu/wpi/grip/ui/codegeneration/python/operations/Find_Contours.vm b/ui/src/main/resources/edu/wpi/grip/ui/codegeneration/python/operations/Find_Contours.vm index a5f5cda8a3..e7ef9ecf59 100644 --- a/ui/src/main/resources/edu/wpi/grip/ui/codegeneration/python/operations/Find_Contours.vm +++ b/ui/src/main/resources/edu/wpi/grip/ui/codegeneration/python/operations/Find_Contours.vm @@ -12,5 +12,5 @@ else: mode = cv2.RETR_LIST method = cv2.CHAIN_APPROX_SIMPLE - im2, contours, hierarchy =cv2.findContours(input, mode=mode, method=method) + im2, contours, hierarchy = cv2.findContours(input, mode=mode, method=method) return contours \ No newline at end of file diff --git a/ui/src/test/java/edu/wpi/grip/ui/PaletteTest.java b/ui/src/test/java/edu/wpi/grip/ui/PaletteTest.java index 07fb8aef0d..386cc5bbb6 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/PaletteTest.java +++ b/ui/src/test/java/edu/wpi/grip/ui/PaletteTest.java @@ -27,6 +27,7 @@ import java.io.IOException; import java.util.Collections; import java.util.List; + import javafx.fxml.FXMLLoader; import javafx.scene.Scene; import javafx.stage.Stage; diff --git a/ui/src/test/java/edu/wpi/grip/ui/UiTests.java b/ui/src/test/java/edu/wpi/grip/ui/UiTests.java index 1ef7dadffb..fca90ddfbe 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/UiTests.java +++ b/ui/src/test/java/edu/wpi/grip/ui/UiTests.java @@ -1,4 +1,4 @@ package edu.wpi.grip.ui; -public interface UiTests { +public interface UiTests { } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/AbstractGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/AbstractGenerationTesting.java index e9cbc925d3..0478f969ec 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/AbstractGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/AbstractGenerationTesting.java @@ -70,7 +70,7 @@ public void setUp() { testModule = new GripCoreTestModule(); testModule.setUp(); final Injector injector = Guice.createInjector(Modules.override(testModule) - .with(new MockGripNetworkModule())); + .with(new MockGripNetworkModule())); injector.injectMembers(this); injector.injectMembers(gen); } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/BlurGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/BlurGenerationTesting.java index 49176abe70..c6bd2a1749 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/BlurGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/BlurGenerationTesting.java @@ -84,11 +84,11 @@ private void pipelineTest(PipelineInterfacer pip) { Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); assertFalse("Pipeline output is empty", - ((org.bytedeco.javacpp.opencv_core.Mat) out.get()).empty()); + ((org.bytedeco.opencv.opencv_core.Mat) out.get()).empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("blur_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 10.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ConvexHullsGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ConvexHullsGenerationTesting.java index ad7115fdc0..72564fef9b 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ConvexHullsGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ConvexHullsGenerationTesting.java @@ -15,7 +15,7 @@ import edu.wpi.grip.ui.codegeneration.tools.PipelineInterfacer; import edu.wpi.grip.util.Files; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; import org.junit.Test; import org.junit.experimental.categories.Category; import org.opencv.core.Mat; @@ -102,11 +102,11 @@ private void pipelineTest(PipelineInterfacer pip) { Optional out = pipeline.getSteps().get(2).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); ContoursReport conOut = (ContoursReport) out.get(); - opencv_core.Mat matOut = new opencv_core.Mat(); + org.bytedeco.opencv.opencv_core.Mat matOut = new org.bytedeco.opencv.opencv_core.Mat(); matOut.create(conOut.getRows(), conOut.getCols(), opencv_core.CV_8UC3); opencv_core.bitwise_xor(matOut, matOut, matOut); - org.bytedeco.javacpp.opencv_imgproc.drawContours(matOut, conOut.getContours(), -1, - opencv_core.Scalar.WHITE); + org.bytedeco.opencv.global.opencv_imgproc.drawContours(matOut, conOut.getContours(), -1, + org.bytedeco.opencv.opencv_core.Scalar.WHITE); pip.setMatSource(0, Files.imageFile.file); pip.process(); diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/DesaturateGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/DesaturateGenerationTesting.java index a31e7bb7b1..b4516d6558 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/DesaturateGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/DesaturateGenerationTesting.java @@ -48,11 +48,11 @@ private void pipelineTest(PipelineInterfacer pip) { new ManualPipelineRunner(eventBus, pipeline).runPipeline(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Output is not present", out.isPresent()); - assertFalse("Output Mat is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()).empty()); + assertFalse("Output Mat is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()).empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("Desaturate_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 10.0); } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/DistanceTransformGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/DistanceTransformGenerationTesting.java index 574992d0cc..53e0ba42c0 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/DistanceTransformGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/DistanceTransformGenerationTesting.java @@ -76,12 +76,12 @@ private void validate(PipelineInterfacer pip) { Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); assertFalse("Pipeline output is empty", - ((org.bytedeco.javacpp.opencv_core.Mat) out.get()).empty()); + ((org.bytedeco.opencv.opencv_core.Mat) out.get()).empty()); pip.setMatSource(0, Files.imageFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("Distance_Transform_Output", GenType.IMAGE); Mat gripMat = new Mat(); - (HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get())) + (HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get())) .convertTo(gripMat, CvType.CV_32F); // distance transform outputs a 1 channel 32F Mat but // grip outputs a 1 channel 8U Mat // HelperTools.displayMats(genMat, gripMat); diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/FilterContoursGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/FilterContoursGenerationTesting.java index 1600e643ad..949b155544 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/FilterContoursGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/FilterContoursGenerationTesting.java @@ -15,7 +15,7 @@ import edu.wpi.grip.ui.codegeneration.tools.PipelineInterfacer; import edu.wpi.grip.util.Files; -import org.bytedeco.javacpp.opencv_core; +import org.bytedeco.opencv.global.opencv_core; import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -147,11 +147,11 @@ private void pipelineTest(PipelineInterfacer pip) { Optional out = pipeline.getSteps().get(2).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); ContoursReport conOut = (ContoursReport) out.get(); - opencv_core.Mat matOut = new opencv_core.Mat(); + org.bytedeco.opencv.opencv_core.Mat matOut = new org.bytedeco.opencv.opencv_core.Mat(); matOut.create(conOut.getRows(), conOut.getCols(), opencv_core.CV_8UC3); opencv_core.bitwise_xor(matOut, matOut, matOut); - org.bytedeco.javacpp.opencv_imgproc.drawContours(matOut, conOut.getContours(), -1, - opencv_core.Scalar.WHITE); + org.bytedeco.opencv.global.opencv_imgproc.drawContours(matOut, conOut.getContours(), -1, + org.bytedeco.opencv.opencv_core.Scalar.WHITE); pip.setMatSource(0, Files.imageFile.file); pip.process(); Mat genMat = diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/FindContoursGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/FindContoursGenerationTesting.java index 4b6d40dbd2..566e4bbf9f 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/FindContoursGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/FindContoursGenerationTesting.java @@ -14,8 +14,8 @@ import edu.wpi.grip.ui.codegeneration.tools.PipelineInterfacer; import edu.wpi.grip.util.Files; -import org.bytedeco.javacpp.opencv_core; -import org.bytedeco.javacpp.opencv_imgproc; +import org.bytedeco.opencv.global.opencv_core; +import org.bytedeco.opencv.global.opencv_imgproc; import org.junit.Test; import org.junit.experimental.categories.Category; import org.opencv.core.Mat; @@ -101,11 +101,11 @@ private void pipelineTest(PipelineInterfacer pip) { Optional out1 = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out1.isPresent()); ContoursReport conOut = (ContoursReport) out1.get(); - opencv_core.Mat matOut = new opencv_core.Mat(); + org.bytedeco.opencv.opencv_core.Mat matOut = new org.bytedeco.opencv.opencv_core.Mat(); matOut.create(conOut.getRows(), conOut.getCols(), opencv_core.CV_8UC3); opencv_core.bitwise_xor(matOut, matOut, matOut); opencv_imgproc.drawContours(matOut, conOut.getContours(), -1, - opencv_core.Scalar.WHITE); + org.bytedeco.opencv.opencv_core.Scalar.WHITE); // exporter.export(pipeline, Language.JAVA,new File() , false); pip.setMatSource(0, Files.imageFile.file); diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/HSLThresholdGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/HSLThresholdGenerationTesting.java index 7bfa3e8404..202cd72eb6 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/HSLThresholdGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/HSLThresholdGenerationTesting.java @@ -46,11 +46,11 @@ private void validate(PipelineInterfacer pip) { new ManualPipelineRunner(eventBus, pipeline).runPipeline(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Output is not present", out.isPresent()); - assertFalse("Output Mat is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()).empty()); + assertFalse("Output Mat is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()).empty()); pip.setMatSource(0, Files.imageFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("HSL_Threshold_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 10.0); } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/HSVThresholdTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/HSVThresholdTesting.java index 3ad0feb0d0..68e751ddb9 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/HSVThresholdTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/HSVThresholdTesting.java @@ -34,11 +34,11 @@ private void validate(PipelineInterfacer pip) { Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); assertFalse("Pipeline output is empty", - ((org.bytedeco.javacpp.opencv_core.Mat) out.get()).empty()); + ((org.bytedeco.opencv.opencv_core.Mat) out.get()).empty()); pip.setMatSource(0, Files.imageFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("HSV_Threshold_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 0.5); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/MaskTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/MaskTesting.java index 3228642206..739ced42aa 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/MaskTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/MaskTesting.java @@ -52,11 +52,11 @@ private void validate(PipelineInterfacer pip) { Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); assertFalse("Pipeline output is empty", - ((org.bytedeco.javacpp.opencv_core.Mat) out.get()).empty()); + ((Mat) out.get()).empty()); pip.setMatSource(0, Files.imageFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("Mask_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 0.5); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NewPointGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NewPointGenerationTesting.java index f4793430ae..5928fd6571 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NewPointGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NewPointGenerationTesting.java @@ -14,7 +14,7 @@ import java.util.Optional; -import static junit.framework.TestCase.assertSame; +import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; @SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert") @@ -45,8 +45,8 @@ private void pipelineTest(PipelineInterfacer pip) { new ManualPipelineRunner(eventBus, pipeline).runPipeline(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Output is not present", out.isPresent()); - org.bytedeco.javacpp.opencv_core.Point gripSize = - (org.bytedeco.javacpp.opencv_core.Point) out.get(); + org.bytedeco.opencv.opencv_core.Point gripSize = + (org.bytedeco.opencv.opencv_core.Point) out.get(); pip.process(); Point genSize = (Point) pip.getOutput("New_Point_Output", GenType.POINT); assertSame("The grip x: " + gripSize.x() + "does not equals the generated x: " + genSize.x, diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NewSizeGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NewSizeGenerationTesting.java index bdfd156829..d70ba8b2aa 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NewSizeGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NewSizeGenerationTesting.java @@ -45,8 +45,8 @@ private void pipelineTest(PipelineInterfacer pip) { new ManualPipelineRunner(eventBus, pipeline).runPipeline(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Output is not present", out.isPresent()); - org.bytedeco.javacpp.opencv_core.Size gripSize = - (org.bytedeco.javacpp.opencv_core.Size) out.get(); + org.bytedeco.opencv.opencv_core.Size gripSize = + (org.bytedeco.opencv.opencv_core.Size) out.get(); pip.process(); Size genSize = (Size) pip.getOutput("New_Size_Output", GenType.SIZE); assertSame("The grip width: " + gripSize.width() + "does not equals the generated width: " diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NormalizeGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NormalizeGenerationTesting.java index bfcebc4ffa..0fb2a5e854 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NormalizeGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/NormalizeGenerationTesting.java @@ -83,11 +83,11 @@ private void pipelineTest(PipelineInterfacer pip) { Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); assertFalse("Pipeline output is empty", - ((org.bytedeco.javacpp.opencv_core.Mat) out.get()).empty()); + ((org.bytedeco.opencv.opencv_core.Mat) out.get()).empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("Normalize_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 10.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/RGBThresholdTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/RGBThresholdTesting.java index dd36655015..4863ff8e66 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/RGBThresholdTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/RGBThresholdTesting.java @@ -55,11 +55,11 @@ private void pipelineTest(PipelineInterfacer pip) { Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); assertFalse("Pipeline output is empty", - ((org.bytedeco.javacpp.opencv_core.Mat) out.get()).empty()); + ((org.bytedeco.opencv.opencv_core.Mat) out.get()).empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("RGB_Threshold_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ResizeTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ResizeTesting.java index 4744801e79..c21f9cd23b 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ResizeTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ResizeTesting.java @@ -89,11 +89,11 @@ private void pipelineTest(PipelineInterfacer pip) { Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); assertFalse("Pipeline output is empty", - ((org.bytedeco.javacpp.opencv_core.Mat) out.get()).empty()); + ((org.bytedeco.opencv.opencv_core.Mat) out.get()).empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("Resize_Image_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 16.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ThresholdMovingTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ThresholdMovingTesting.java index 566e091933..368214a64e 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ThresholdMovingTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/ThresholdMovingTesting.java @@ -29,7 +29,6 @@ public class ThresholdMovingTesting extends AbstractGenerationTesting { * Sets up the pipeline with given number of moving thresholds. * * @param num number of moving thresholds to put in pipeline, 1 indexed. - * * @return an array of the switch steps used to trigger the moving thresholds. */ public ThresholdSwitch[] setupThreshold(int num) { @@ -153,7 +152,7 @@ public boolean toggle() { public Mat getOutput() { Optional out = thresh.getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - return HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + return HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); } } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/WatershedGenerationTesting.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/WatershedGenerationTesting.java index 847ddf2732..5266e5d8d1 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/WatershedGenerationTesting.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/WatershedGenerationTesting.java @@ -98,7 +98,7 @@ private void pipelineTest(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(2).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - org.bytedeco.javacpp.opencv_core.Mat matOut = (org.bytedeco.javacpp.opencv_core.Mat) out.get(); + org.bytedeco.opencv.opencv_core.Mat matOut = (org.bytedeco.opencv.opencv_core.Mat) out.get(); Mat gripMat = HelperTools.bytedecoMatToCVMat(matOut); pip.setMatSource(0, Files.imageFile.file); diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAbsDiff.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAbsDiff.java index 825b1b45f0..e82fa23b14 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAbsDiff.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAbsDiff.java @@ -56,12 +56,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_AbsDiff_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAdaptiveThreshold.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAdaptiveThreshold.java index 5e30a495b5..b30f111dc8 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAdaptiveThreshold.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAdaptiveThreshold.java @@ -27,7 +27,7 @@ public class CVAdaptiveThreshold extends AbstractGenerationTesting { private boolean setup(AdaptiveThresholdTypesEnum adaptMethod, - CVOperations.CVAdaptThresholdTypesEnum threshMethod) { + CVOperations.CVAdaptThresholdTypesEnum threshMethod) { Step desat = gen.addStep(new OperationMetaData( OperationDescription.from(DesaturateOperation.class), () -> new DesaturateOperation(isf, osf))); @@ -84,10 +84,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_AdaptiveThreshold_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAdd.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAdd.java index 90a2cd6ff1..5321ba9cc2 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAdd.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAdd.java @@ -55,12 +55,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_Add_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAddWeighted.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAddWeighted.java index bea4556727..926c3e211b 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAddWeighted.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVAddWeighted.java @@ -58,12 +58,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_AddWeighted_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVApplyColorMap.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVApplyColorMap.java index 2df7726548..77d646904e 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVApplyColorMap.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVApplyColorMap.java @@ -27,7 +27,7 @@ private boolean set(ColormapTypesEnum map) { OutputSocket imgOut = pipeline.getSources().get(0).getOutputSockets().get(0); gen.connect(imgOut, step.getInputSockets().get(0)); step.getInputSockets().get(1).setValue(map); - + return true; } @@ -35,67 +35,67 @@ private boolean set(ColormapTypesEnum map) { public void testAutumn() { helpTest(ColormapTypesEnum.COLORMAP_AUTUMN, "AutumnTest"); } - + @Test public void testBone() { helpTest(ColormapTypesEnum.COLORMAP_BONE, "BoneTest"); } - + @Test public void testJet() { helpTest(ColormapTypesEnum.COLORMAP_JET, "JetTest"); } - + @Test public void testWinter() { helpTest(ColormapTypesEnum.COLORMAP_WINTER, "WinterTest"); } - + @Test public void testRainbow() { helpTest(ColormapTypesEnum.COLORMAP_RAINBOW, "RainbowTest"); } - + @Test public void testOcean() { helpTest(ColormapTypesEnum.COLORMAP_OCEAN, "OceanTest"); } - + @Test public void testSummer() { helpTest(ColormapTypesEnum.COLORMAP_SUMMER, "SummerTest"); } - + @Test public void testSpring() { helpTest(ColormapTypesEnum.COLORMAP_SPRING, "SpringTest"); } - + @Test public void testCool() { helpTest(ColormapTypesEnum.COLORMAP_COOL, "CoolTest"); } - + @Test public void testHSV() { helpTest(ColormapTypesEnum.COLORMAP_HSV, "HSVTest"); } - + @Test public void testPink() { helpTest(ColormapTypesEnum.COLORMAP_PINK, "PinkTest"); } - + @Test public void testHot() { helpTest(ColormapTypesEnum.COLORMAP_HOT, "HotTest"); } - + @Test public void testParula() { helpTest(ColormapTypesEnum.COLORMAP_PARULA, "ParulaTest"); } - + private void helpTest(ColormapTypesEnum map, String testName) { test(() -> set(map), (pip) -> validate(pip), "cvColorMap" + testName); } @@ -107,10 +107,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_ApplyColorMap_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseAnd.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseAnd.java index 3f5706b798..ab9f9a31ef 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseAnd.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseAnd.java @@ -55,12 +55,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_Bitwise_And_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseNot.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseNot.java index 27013e6314..b25d3ec634 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseNot.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseNot.java @@ -40,10 +40,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_Bitwise_Not_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseOr.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseOr.java index 9d6255adce..913645ddb2 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseOr.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseOr.java @@ -55,12 +55,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_Bitwise_Or_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseXor.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseXor.java index 97fac0d751..0b586176bd 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseXor.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVBitwiseXor.java @@ -55,12 +55,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_Bitwise_Xor_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVCanny.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVCanny.java index e7211249bc..7ff595b126 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVCanny.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVCanny.java @@ -50,10 +50,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_Canny_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVCompare.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVCompare.java index 3af03b0e51..248f483f7f 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVCompare.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVCompare.java @@ -82,12 +82,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_Compare_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVDilate.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVDilate.java index f96de6a1e6..75fcb9ab59 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVDilate.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVDilate.java @@ -85,10 +85,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_Dilate_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 10); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVDivide.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVDivide.java index dfd4adc5e3..617359955d 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVDivide.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVDivide.java @@ -56,12 +56,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_Divide_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVErode.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVErode.java index 39c7a4dd9b..b80fa4d721 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVErode.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVErode.java @@ -85,10 +85,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_Erode_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 10); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVExtractChannel.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVExtractChannel.java index 6332751e92..ac933f1287 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVExtractChannel.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVExtractChannel.java @@ -38,12 +38,12 @@ public void extractZeroTest() { public void extractOneTest() { test(() -> setup(1), (pip) -> validate(pip), "extractOneTest"); } - + @Test public void extractTwoTest() { test(() -> setup(2), (pip) -> validate(pip), "extractTwoTest"); } - + private void validate(PipelineInterfacer pip) { ManualPipelineRunner runner = new ManualPipelineRunner(eventBus, pipeline); runner.runPipeline(); @@ -51,10 +51,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_ExtractChannel_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVFlip.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVFlip.java index adaba4398f..b60a782764 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVFlip.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVFlip.java @@ -45,7 +45,7 @@ public void bothAxesTest() { test(() -> setup(FlipCode.BOTH_AXES), (pip) -> validate(pip), "FlipBothAxesTest"); } - + private void validate(PipelineInterfacer pip) { ManualPipelineRunner runner = new ManualPipelineRunner(eventBus, pipeline); runner.runPipeline(); @@ -53,10 +53,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_Flip_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVGaussianBlur.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVGaussianBlur.java index 8498cb8a6b..c168fd8939 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVGaussianBlur.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVGaussianBlur.java @@ -94,10 +94,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_GaussianBlur_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); //HelperTools.displayMats(genMat, gripMat); assertMatWithin(genMat, gripMat, 1.0); } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVLaplacian.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVLaplacian.java index d38c998d81..94d5a4a32d 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVLaplacian.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVLaplacian.java @@ -88,10 +88,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_Laplacian_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMax.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMax.java index 98bd34f0e8..d888748c4a 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMax.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMax.java @@ -55,12 +55,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_Max_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMedianBlur.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMedianBlur.java index 219ee25c95..9fdc2c0c65 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMedianBlur.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMedianBlur.java @@ -40,10 +40,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_MedianBlur_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMin.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMin.java index 428cf923f7..d331c7e116 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMin.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMin.java @@ -55,12 +55,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_Min_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMultiply.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMultiply.java index 4692f1907a..f492d1a3f8 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMultiply.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVMultiply.java @@ -56,12 +56,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_Multiply_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVRectangle.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVRectangle.java index fb2ff83285..eb2d031475 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVRectangle.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVRectangle.java @@ -97,10 +97,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(2).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_Rectangle_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVResize.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVResize.java index b1c5a40156..10cf89f46e 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVResize.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVResize.java @@ -44,10 +44,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_Resize_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVScaleAdd.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVScaleAdd.java index 16b361fede..b8a898524c 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVScaleAdd.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVScaleAdd.java @@ -57,12 +57,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_ScaleAdd_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVSobel.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVSobel.java index 427c78f148..38ae185811 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVSobel.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVSobel.java @@ -92,10 +92,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_Sobel_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVSubtract.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVSubtract.java index 70db83842c..0eb34c57d7 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVSubtract.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVSubtract.java @@ -56,12 +56,12 @@ private void validate(PipelineInterfacer pip) { runner.runPipeline(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); pip.setMatSource(0, Files.gompeiJpegFile.file); pip.process(); Mat genMat = (Mat) pip.getOutput("CV_Subtract_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 2.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVThreshold.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVThreshold.java index 2d50695587..a48ce6acd5 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVThreshold.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVThreshold.java @@ -89,10 +89,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(1).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_Threshold_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVTranspose.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVTranspose.java index 537b88afab..fd4ffa7416 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVTranspose.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVTranspose.java @@ -40,10 +40,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_Transpose_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 1.0); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVcvtColor.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVcvtColor.java index 94f33930ca..73d7ea7046 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVcvtColor.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/cv/CVcvtColor.java @@ -48,10 +48,10 @@ private void validate(PipelineInterfacer pip) { pip.process(); Optional out = pipeline.getSteps().get(0).getOutputSockets().get(0).getValue(); assertTrue("Pipeline did not process", out.isPresent()); - assertFalse("Pipeline output is empty", ((org.bytedeco.javacpp.opencv_core.Mat) out.get()) + assertFalse("Pipeline output is empty", ((org.bytedeco.opencv.opencv_core.Mat) out.get()) .empty()); Mat genMat = (Mat) pip.getOutput("CV_cvtColor_Output", GenType.IMAGE); - Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.javacpp.opencv_core.Mat) out.get()); + Mat gripMat = HelperTools.bytedecoMatToCVMat((org.bytedeco.opencv.opencv_core.Mat) out.get()); assertMatWithin(genMat, gripMat, 10); } } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/GenType.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/GenType.java index c6282aebec..4aa7a06f48 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/GenType.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/GenType.java @@ -1,5 +1,5 @@ package edu.wpi.grip.ui.codegeneration.tools; public enum GenType { -NUMBER, BOOLEAN, POINT, SIZE, LINES, CONTOURS, BLOBS, LIST, IMAGE + NUMBER, BOOLEAN, POINT, SIZE, LINES, CONTOURS, BLOBS, LIST, IMAGE } diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/HelperTools.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/HelperTools.java index 3a48d028e4..427f1c2443 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/HelperTools.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/HelperTools.java @@ -8,7 +8,7 @@ import org.opencv.core.MatOfByte; import org.opencv.imgcodecs.Imgcodecs; -import java.awt.BorderLayout; +import java.awt.*; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -16,9 +16,8 @@ import java.util.logging.Logger; import javax.imageio.ImageIO; -import javax.swing.ImageIcon; -import javax.swing.JFrame; -import javax.swing.JLabel; +import javax.swing.*; +//import javax.swing.*; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -69,7 +68,7 @@ public static double matAvgDiff(Mat mat1, Mat mat2) { * @param input the bytedeco Mat to convert * @return an OpenCV Mat */ - public static Mat bytedecoMatToCVMat(org.bytedeco.javacpp.opencv_core.Mat input) { + public static Mat bytedecoMatToCVMat(org.bytedeco.opencv.opencv_core.Mat input) { UByteIndexer idxer = input.createIndexer(); Mat out = new Mat((int) idxer.rows(), (int) idxer.cols(), CV_8UC((int) idxer.channels())); //Mat out = new Mat(idxer.rows(),idxer.cols(),input.type()); diff --git a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/PipelineInterfacer.java b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/PipelineInterfacer.java index f367f0d9f7..27f1df1578 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/PipelineInterfacer.java +++ b/ui/src/test/java/edu/wpi/grip/ui/codegeneration/tools/PipelineInterfacer.java @@ -7,7 +7,7 @@ public interface PipelineInterfacer { void setMatSource(int num, File img); void setNumSource(int num, Number val); - + void process(); Object getOutput(String name, GenType type); diff --git a/ui/src/test/java/edu/wpi/grip/ui/pipeline/PipelineUITest.java b/ui/src/test/java/edu/wpi/grip/ui/pipeline/PipelineUITest.java index 80480bb103..edaf39d3f3 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/pipeline/PipelineUITest.java +++ b/ui/src/test/java/edu/wpi/grip/ui/pipeline/PipelineUITest.java @@ -155,8 +155,8 @@ public void testMoveOperation() { verifyThatIter(".step", new BaseMatcher>() { @Override public boolean matches(Object item) { - @SuppressWarnings("unchecked") - final List stepsNodes = Lists.newArrayList((Iterable) item); + @SuppressWarnings("unchecked") final List stepsNodes + = Lists.newArrayList((Iterable) item); assertEquals("Moving a step resulting in the number of steps changing", 3, stepsNodes .size()); diff --git a/ui/src/test/java/edu/wpi/grip/ui/preview/PointSizeSocketPreviewViewTest.java b/ui/src/test/java/edu/wpi/grip/ui/preview/PointSizeSocketPreviewViewTest.java index 6c8b16c221..1e68d420e1 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/preview/PointSizeSocketPreviewViewTest.java +++ b/ui/src/test/java/edu/wpi/grip/ui/preview/PointSizeSocketPreviewViewTest.java @@ -13,8 +13,8 @@ import com.google.inject.Injector; import com.google.inject.util.Modules; -import org.bytedeco.javacpp.opencv_core.Point; -import org.bytedeco.javacpp.opencv_core.Size; +import org.bytedeco.opencv.opencv_core.Point; +import org.bytedeco.opencv.opencv_core.Size; import org.junit.After; import org.junit.Test; import org.junit.experimental.categories.Category; diff --git a/ui/src/test/java/edu/wpi/grip/ui/util/DebugUtility.java b/ui/src/test/java/edu/wpi/grip/ui/util/DebugUtility.java index 9edccaf8e4..433b068e36 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/util/DebugUtility.java +++ b/ui/src/test/java/edu/wpi/grip/ui/util/DebugUtility.java @@ -9,7 +9,7 @@ */ public final class DebugUtility { private DebugUtility() { - /* no-op */ + /* no-op */ } /** diff --git a/ui/src/test/java/edu/wpi/grip/ui/util/ImageConverterTest.java b/ui/src/test/java/edu/wpi/grip/ui/util/ImageConverterTest.java index a6dbd50023..ce557257df 100644 --- a/ui/src/test/java/edu/wpi/grip/ui/util/ImageConverterTest.java +++ b/ui/src/test/java/edu/wpi/grip/ui/util/ImageConverterTest.java @@ -5,7 +5,7 @@ import edu.wpi.grip.util.Files; import edu.wpi.grip.util.ImageWithData; -import org.bytedeco.javacpp.opencv_core.Mat; +import org.bytedeco.opencv.opencv_core.Mat; import org.junit.Test; import org.junit.experimental.categories.Category; import org.testfx.framework.junit.ApplicationTest; @@ -19,8 +19,8 @@ import javafx.scene.layout.Pane; import javafx.stage.Stage; -import static org.bytedeco.javacpp.opencv_imgproc.COLOR_BGR2GRAY; -import static org.bytedeco.javacpp.opencv_imgproc.cvtColor; +import static org.bytedeco.opencv.global.opencv_imgproc.COLOR_BGR2GRAY; +import static org.bytedeco.opencv.global.opencv_imgproc.cvtColor; import static org.junit.Assert.assertEquals; diff --git a/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/CMakeLists.txt b/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/CMakeLists.txt index dbbefa22c5..2ff63373d1 100644 --- a/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/CMakeLists.txt +++ b/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/CMakeLists.txt @@ -28,12 +28,12 @@ target_include_directories(genJNI PUBLIC ${CV_HEADER_LOCATION}) if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") target_link_libraries(genJNI ${LINK_OPTIONS}) target_link_libraries(genJNI - opencv_core.3.1.0 - opencv_objdetect.3.1.0 - opencv_features2d.3.1.0 - opencv_imgcodecs.3.1.0 - opencv_imgproc.3.1.0 - opencv_highgui.3.1.0 + opencv_core.4.5.1 + opencv_objdetect.4.5.1 + opencv_features2d.4.5.1 + opencv_imgcodecs.4.5.1 + opencv_imgproc.4.5.1 + opencv_highgui.4.5.1 pipe ) endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") diff --git a/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/pipe/CMakeLists.txt b/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/pipe/CMakeLists.txt index f758548b41..c76a0a4ddc 100644 --- a/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/pipe/CMakeLists.txt +++ b/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/pipe/CMakeLists.txt @@ -9,12 +9,12 @@ add_library(pipe SHARED ${CXX_SRCS}) if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") target_link_libraries(pipe ${LINK_OPTIONS}) target_link_libraries(pipe - opencv_core.3.1.0 - opencv_objdetect.3.1.0 - opencv_features2d.3.1.0 - opencv_imgcodecs.3.1.0 - opencv_imgproc.3.1.0 - opencv_highgui.3.1.0 + opencv_core.4.5.1 + opencv_objdetect.4.5.1 + opencv_features2d.4.5.1 + opencv_imgcodecs.4.5.1 + opencv_imgproc.4.5.1 + opencv_highgui.4.5.1 ) endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") diff --git a/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/realpipe/CMakeLists.txt b/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/realpipe/CMakeLists.txt index 35740a68cf..6253eb619b 100644 --- a/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/realpipe/CMakeLists.txt +++ b/ui/src/test/resources/edu/wpi/grip/ui/codegeneration/tools/realpipe/CMakeLists.txt @@ -31,12 +31,12 @@ ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(LINK_OPTIONS -O2) target_link_libraries(${NAME} ${LINK_OPTIONS}) target_link_libraries(${NAME} - opencv_core.3.1.0 - opencv_objdetect.3.1.0 - opencv_features2d.3.1.0 - opencv_imgcodecs.3.1.0 - opencv_imgproc.3.1.0 - opencv_highgui.3.1.0 + opencv_core.4.5.1 + opencv_objdetect.4.5.1 + opencv_features2d.4.5.1 + opencv_imgcodecs.4.5.1 + opencv_imgproc.4.5.1 + opencv_highgui.4.5.1 pipe ) ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows") diff --git a/ui/ui.gradle.kts b/ui/ui.gradle.kts index 23e89d52ba..78fa75c4d8 100644 --- a/ui/ui.gradle.kts +++ b/ui/ui.gradle.kts @@ -56,7 +56,7 @@ dependencies { testCompile(group = "org.testfx", name = "testfx-core", version = "4.0.16-alpha") testCompile(group = "org.testfx", name = "testfx-junit", version = "4.0.15-alpha") testRuntime(group = "org.testfx", name = "openjfx-monocle", version = "jdk-11+26") - testCompile(group = "org.opencv", name = "opencv-java", version = "3.1.0") + testCompile(group = "org.openpnp", name = "opencv", version = "4.5.1-2") } tasks.named("compileTestJava") { @@ -169,7 +169,7 @@ if (project.hasProperty("generation") || project.hasProperty("genonly")) { val installOpenCV = tasks.register("installOpenCV") { doFirst { - Installer.setOpenCvVersion("3.1.0") + Installer.setOpenCvVersion("4.5.1") Installer.installJni(jniPath) } }