You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using OpenCV on a Pi 4 with the ArmV7L native library loaded. When I try to capture an image through the Pi Camera with square resolutions from 700x700 to 790x790 in increments of 10, the image is completely garbled. Setting the capture to a non-square resolution like 700x730 results in a clear image.
Square resolutions tried that result in a garbled image:
700x700
710x710
720x720
730x730
740x740
750x750
760x760
770x770
780x780
790x790
Expected result: The image shouldn't be garbled, with whatever's in shot clearly visible.
What actually happens: The image is a garbled mess, nothing is visible.
Reproduction Code:
try {
VideoCapturecamera = newVideoCapture(0);
camera.set(Videoio.CAP_PROP_FRAME_WIDTH, 700);
camera.set(Videoio.CAP_PROP_FRAME_HEIGHT, 700);
if (camera.isOpened()) {
Matimage = newMat();
MatOfBytebuffer = newMatOfByte();
if(colour) {
camera.read(image);
Imgcodecs.imencode(".jpg", image, buffer);
}else{
camera.read(image);
Imgproc.cvtColor(image, image, Imgproc.COLOR_BGR2GRAY);
Imgcodecs.imencode(".jpg", image, buffer);
}
// Converting the mat into a BufferedImagethis.image = ImageIO.read(newByteArrayInputStream(buffer.toArray()));
}
camera.release();
}catch(Exceptione){
e.printStackTrace();
}
The text was updated successfully, but these errors were encountered:
I'm currently using OpenCV on a Pi 4 with the ArmV7L native library loaded. When I try to capture an image through the Pi Camera with square resolutions from 700x700 to 790x790 in increments of 10, the image is completely garbled. Setting the capture to a non-square resolution like 700x730 results in a clear image.
Square resolutions tried that result in a garbled image:
Expected result: The image shouldn't be garbled, with whatever's in shot clearly visible.
What actually happens: The image is a garbled mess, nothing is visible.
Reproduction Code:
The text was updated successfully, but these errors were encountered: