[Bug 678485] templatematch: element improvements

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Jul 28 12:10:56 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=678485
  GStreamer | gst-plugins-bad | 1.x

Thiago Sousa Santos <thiagossantos> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|1.5.1                       |1.4.1

--- Comment #7 from Thiago Sousa Santos <thiagossantos at gmail.com> 2014-07-28 19:10:51 UTC ---
Pushed the 2 bugfixes from the patches above to 1.4 branch:
commit 1f30334b5d16a62bec2af526bdb365a986bfd774
Author: David Rothlisberger <david.rothlisberger at youview.com>
Date:   Fri Jun 15 13:19:06 2012 +0100

    opencv templatematch: Set caps to BGR order

    templatematch operates on BGR data. In fact, OpenCV's IplImage always
    stores color image data in BGR order -- this isn't documented at all in
    the OpenCV source code, but there are hints around the web (see for
    example
   
http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/opencv-intro.html#SECTION00041000000000000000
    and http://www.comp.leeds.ac.uk/vision/opencv/iplimage.html ).

    gst_templatematch_load_template loads the template (the image to find)
    from disk using OpenCV's cvLoadImage, so it is stored in an IplImage in
    BGR order. But in gst_templatematch_chain, no OpenCV conversion
    functions are used: the imageData pointer of the IplImage for the video
    frame (the image to search in) is just set to point to the raw buffer
    data. Without this fix, that raw data is in RGB order, so the call to
    cvMatchTemplate ends up comparing the template's Blue channel against
    the frame's Red channel, producing very poor results.

commit 9bdb536eec8d0685979a8d9509978cf709c4f01f
Author: Thiago Santos <ts.santos at osg.sisa.samsung.com>
Date:   Mon Jul 28 13:10:35 2014 -0300

    templatematch: mark pads as proxy caps

    Allows negotiation to happen properly

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list