Giter Site home page Giter Site logo

Comments (7)

cedricve avatar cedricve commented on August 10, 2024

Does it work with the default width and height?

from raspicam.

mcemilg avatar mcemilg commented on August 10, 2024

This is what happens if I do not call any set function;

raspicam_cv_image1

But if i call setters with default values like the folloowing;

cap->set(CV_CAP_PROP_FRAME_WIDTH , 2592);
cap->set(CV_CAP_PROP_FRAME_HEIGHT, 1944);

I am getting this frame, this is corrupted but not as much as the others;

raspicam_cv_image3

from raspicam.

benrules2 avatar benrules2 commented on August 10, 2024

Are you repeatedly getting a new frame, or just grabbing one? My live feed looks like this sometimes when the camera has just started, but fixes itself. Maybe a 5s sleep before grabbing the image would help.

from raspicam.

dennisss avatar dennisss commented on August 10, 2024

I am also getting this issue with the the non-opencv video version.

By adding the line: Camera.setCaptureSize(1640, 1232); to simpletest_raspicam.cpp the following image is produced:

raspicam_image

Hardware is Raspberry Pi 3 and Camera v2. The default resolution works fine, but I'm trying to get a higher resolution. Both picamera and raspivid are able to output this resolution, so I'm not sure what's different with this library.

Any ideas? Thanks!

from raspicam.

FirstCaptain avatar FirstCaptain commented on August 10, 2024

I am having the exact same issue. Has anyone found out a work around or how to fix it yet?

from raspicam.

dennisss avatar dennisss commented on August 10, 2024

@FirstCaptain yes, I've found the solution and have a rough patch on my branch (https://github.com/dennisss/raspicam/) implemented for video only right now though.

I've tested it with grayscale on the RPi Camera v2, but I think it should work for RGB and BGR as well. YUV needs more work.

The main issue is that if the width and height is not aligned to 32 x 16 blocks, mmal internally pads each row up to that alignment point.
So the fix is basically to change the routine that copies the buffer to do it row by row and skip the padding: https://github.com/dennisss/raspicam/blob/master/src/private/private_impl.cpp#L766

from raspicam.

cedricve avatar cedricve commented on August 10, 2024

awesome @dennisss can we merge upstream?

from raspicam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.