Okay, I have to compare some outputs. I need to be able to see the content of the Mat object I create by reading an image. I tried a few approaches but some functions that exist according to the documentation and according to other StackOverFlow articles are apparently not defined. I'm using Java CV instead of OpenCV but it's not defined.
Link to the other article: Print opencv matrix content in Java
Does anyone know why this might be happening?
import org.bytedeco.opencv.opencv_imgproc.*;
import static org.bytedeco.opencv.global.opencv_core.*;
import org.bytedeco.opencv.opencv_core.Size;
import org.bytedeco.opencv.opencv_imgproc.Vec2fVector;
import org.bytedeco.opencv.opencv_core.*;
import static org.bytedeco.opencv.global.opencv_imgproc.*;
import static org.bytedeco.opencv.global.opencv_imgcodecs.*;
import static org.bytedeco.opencv.global.opencv_core.CV_PI;
import static org.bytedeco.opencv.global.opencv_imgproc.HoughLines;
import org.opencv.imgproc.Imgproc;
public class ImagePreProcessor {
org.bytedeco.opencv.opencv_core.Mat image;
ImagePreProcessor(String path) {
this.image = new org.bytedeco.opencv.opencv_core.Mat();
org.bytedeco.opencv.opencv_core.Mat image = imread(path, IMREAD_GRAYSCALE);
org.bytedeco.opencv.opencv_core.Size sz = new
org.bytedeco.opencv.opencv_core.Size(500, 500);
// The following two lines **are not working**
image.get(2,3);
image.dump(); // apparently these functions are not defined even though the documentation says that they're defined
}