Ask Your Question

tgpsantos's profile - activity

2019-07-18 09:06:30 -0600 edited question Writing video in .mp4

Writing video in .mp4 Hello, I've been able to save videos in ANDROID using OpenCV VideoWriter (MJPEG) in .avi format b

2019-07-18 09:00:05 -0600 asked a question Writing video in .mp4

Writing video in .mp4 Hello, I've been able to save videos in ANDROID using OpenCV VideoWriter (MJPEG) in .avi format b

2019-06-26 03:20:02 -0600 answered a question Video writer in java not saving

Finally understood what was wrong. I was just giving the name of the video whereas I should be stating the full path, li

2019-06-22 04:15:37 -0600 received badge  Enthusiast
2019-06-21 11:23:39 -0600 commented question Video writer in java not saving

Some more tweaks in the parameters that unfortunately also didn't work: - adding "apiPreference"= -1 and "isColour"=true

2019-06-20 02:40:02 -0600 commented question Video writer in java not saving

Hello berak, (1) thanks, (2) isOpened() is returning false (3) I was hoping it would simply save it to the smartphone

2019-06-20 02:37:50 -0600 edited question Video writer in java not saving

Video writer in java not saving Hello all, I want to record the frames I'm processing in my android smarthpone but noth

2019-06-19 06:08:37 -0600 edited question Video writer in java not saving

Video writer in java not saving Hello all, I want to record the frames I'm processing in my android smarthpone but noth

2019-06-19 04:50:59 -0600 asked a question Video writer in java not saving

Video writer in java not saving Hello all, I want to record the frames I'm processing in my android smarthpone but noth

2019-06-13 03:40:07 -0600 marked best answer Mat type CV_8U but ByteBuffer values range from -128 to 127

Hello guys,

I have a frame which has its type = 24. According to this table this means the frame is CV_8U, thus its values should be around 0 and 255.

I wanted to confirm that in fact the values I'm getting are 0-255, so I did the following: byte[] buff= new byte[frame.cols() * frame.rows() * 4]; //nº total de valores (3 canais)

    frame.get(0,0,buff);

    Log.d("frame type:","frame_type:"+frame.type());

    max_pixel=-100;
    min_pixel=100;
    for(int i=0; i<frame.cols(); i++) {
        for(int j=0; j<frame.cols(); j++) {
            if (buff[i]>max_pixel) {
                max_pixel=buff[i]; } 
            else if(buff[i]<min_pixel){
                 min_pixel=buff[i];
            }
        }
    }
    Log.d("max_pixel", "max_pixel:"+max_pixel);
    Log.d("min_pixel", "min_pixel:"+min_pixel);

What I got from this was: (1) min_pixel = -128 (2) max_pixel = 127

Is this normal for a ByteBuffer? Because it seems like its type is a CV_8S instead

Thanks for the help!

2019-06-13 03:40:07 -0600 received badge  Scholar (source)
2019-06-13 03:39:42 -0600 edited question Mat type CV_8U but ByteBuffer values range from -128 to 127

Mat type CV_8U but ByteBuffer values range from -128 to 127 Hello guys, I have a frame which has its type = 24. Accordi

2019-06-13 03:39:42 -0600 received badge  Editor (source)
2019-06-13 03:08:36 -0600 asked a question Mat type CV_8U but ByteBuffer values range from -128 to 127

Mat type CV_8U but ByteBuffer values range from -128 to 127 Hello guys, I have a frame which has its type = 24. Accordi

2019-04-29 05:27:15 -0600 answered a question Canny Edge Detector doesn't return filtered image

I have the same problem as you! Tried a simple cvtColor to grayscale but I only get the original rgb frames...

2019-04-29 05:27:14 -0600 answered a question Opencv for android ignoring inputFrame

I'm having the same problem. It only displays original rgb frames, even when I change inputFrame.rgba() @Override publi