Ask Your Question

heredic's profile - activity

2017-04-18 00:59:29 -0600 received badge  Famous Question (source)
2016-12-04 19:05:13 -0600 received badge  Popular Question (source)
2016-04-02 06:31:26 -0600 received badge  Famous Question (source)
2015-12-12 09:52:17 -0600 received badge  Notable Question (source)
2015-06-05 12:12:40 -0600 received badge  Notable Question (source)
2015-01-29 03:09:17 -0600 received badge  Popular Question (source)
2014-09-05 15:01:03 -0600 received badge  Popular Question (source)
2013-05-31 07:44:20 -0600 commented question Are there OpenCV versions (>=2.4.5) capable of writing RGBA video?

If I DO end up implementing it with ffmpeg, I'll be sure to integrate it with OpenCV, for a better world. :)

2013-05-31 05:41:56 -0600 asked a question Are there OpenCV versions (>=2.4.5) capable of writing RGBA video?

I tried writing a RGBA video file using VideoWriter+flv1 and BGRA input Mats, but it came out not playable.

I was wondering if there are newer versions (not stable of course) capable of encoding/writing RGBA video files..?

I really wouldn't want to directly use ffmpeg APIs while already using OpenCV..

2013-05-30 01:12:44 -0600 asked a question Peculiarity with VideoWriter codec selection....

I ran into issues with VideoWriter coding flv, so I found hope by forums claiming I should install all sorts of codecs + FFMPEG manually from source, and rerun cmake + make + make install in opencv 2.4.5 directory. cmake claimed it found all the required FFMPEG dependencies and will use them (However, I did not explicitly tell cmake to do so...).

Then, I attempted:


out.open("/home/dror/Videos/IMG-0.flv", CV_FOURCC('F','L','V','1'), cap.get(CV_CAP_PROP_FPS), S, true);

And it blessed me with:


[flv @ 0x173f7a0] Tag FLV1/0x31564c46 incompatible with output codec id '22' ([2][0][0][0])
OpenCV Error: Unsupported format or combination of formats (Gstreamer Opencv backend doesn't support this codec acutally.) in CvVideoWriter_GStreamer::open, file /home/dror/src/opencv/modules/highgui/src/cap_gstreamer.cpp, line 505
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/dror/src/opencv/modules/highgui/src/cap_gstreamer.cpp:505: error: (-210) Gstreamer Opencv backend doesn't support this codec acutally. in function CvVideoWriter_GStreamer::open

I changed the file extension:


out.open("/home/dror/Videos/IMG-0.avi", CV_FOURCC('F','L','V','1'), cap.get(CV_CAP_PROP_FPS), S, true);

And it worked fine. (If you belive ffmpeg -i output)..

Possible reasons:

  1. I didn't EXPLICITLY tell cmake to use FFMPEG.
  2. The sources I used don't reside in /usr/src?
  3. I should have purged manually OpenCV installation before reinstalling..?
  4. I'm using too old a version of FFMPEG..? (ffmpeg-0.11.1)
  5. This is a peculiar bug..
  6. This is where you come in! :)

Help!

2013-05-28 06:13:40 -0600 received badge  Student (source)
2013-05-27 05:27:22 -0600 asked a question Calculate Gradient Magnitudes of 3D Mat

I would like this result in order to pin-point some local maximum/minimum of an RGB histogram. How can I achieve this? (Doing this by brute-force should be out of the question of course)

2013-05-27 04:27:40 -0600 commented answer calcHist() usage for RGB histogram...?

@yes123 Yes I ""understand"" how tough this subject is, by looking around.. In my case though, it is a shadow of a person (not wearing gray scale clothing :) cast on a "white" wall. If I floodFill the MAX of the histogram with correct diffs, in points valued gray-ish local MAXs (of the histogram), I might make the shadows almost disappear.. Then I could maybe succeed in the canny of the person. The big question is: How can the algorithm pick aprox. 1 point from each shadow region, so floodFill wouldn't run 10000 times...?

2013-05-27 03:21:06 -0600 commented answer calcHist() usage for RGB histogram...?

@berak lol. Me wishful thinks I'll manage... :) I just need the MAX and some gray-ish local MAXs, in my attempt to be rid of the damn shadows! They are ruining the canny!

2013-05-27 03:16:48 -0600 asked a question Slightly irrelevant: Concise C++ language learning material

In the past I learned intermediate/advanced C++ without practicing. Consequently, I now remember next to nothing.

Do you guys know any good concise learning material which I can use to freshen up on language features most relevant to OpenCV?

2013-05-27 02:18:11 -0600 received badge  Editor (source)
2013-05-27 02:17:41 -0600 asked a question calcHist() usage for RGB histogram...?

The code:


    int imgCount = 1;
    int dims = 3;
    const int sizes[] = {256,256,256};
    const int channels[] = {0,1,2};
    float* rRange = {0,256};
    float* gRange = {0,256};
    float* bRange = {0,256};
    const float ranges[] = {rRange,gRange,bRange};
    Mat mask = Mat();

    calcHist(src, imgCount, channels, mask, hist, dims, sizes, ranges);

Produces "error: No matching function..." among other errors..

What are my mistakes?

2013-05-26 08:06:59 -0600 commented answer Replace a range of colors with a specific color

@rics thanks! Is there any chance of example code..? Only if you feel like it :)

2013-05-26 07:59:29 -0600 received badge  Scholar (source)
2013-05-26 07:59:17 -0600 received badge  Supporter (source)
2013-05-26 02:59:05 -0600 asked a question Replace a range of colors with a specific color

Is there a function that receives an image/frame Mat M, a range R of RGB/A colors, and an RGB/A color C, and replaces occurrences (pixel values) of R with C?

2013-05-26 02:49:26 -0600 asked a question Output an RGBA video

From what I understand It is not possible (2.4.5) to load a video including (if present) an alpha channel.

However is there some way to OUTPUT an RGBA video?