[Bug 702722] opencv: add GrabCut segmentation element

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Jul 9 02:30:17 PDT 2013


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

Sebastian Dröge <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #247303|none                        |needs-work
             status|                            |

--- Comment #3 from Sebastian Dröge <slomo at circular-chaos.org> 2013-07-09 09:19:14 UTC ---
Review of attachment 247303:
 --> (https://bugzilla.gnome.org/review?bug=702722&attachment=247303)

::: ext/opencv/gstfacedetect.c
@@ +674,3 @@
+        GstEvent *ev;
+        GstStructure *str;
+        str = gst_structure_new ("face",

Prefix the structure with the element name at least, GstOpenCVFaceDetect-face
or something like that.

Also this should probably be a GstMeta on the buffer instead of an event

::: ext/opencv/gstgrabcut.cpp
@@ +181,3 @@
+IN CASE OF no alpha mask input (all 0's or all 1's), the 'face' \
+downstream event is used to create a bbox of PR_FG elements.\n\
+IF nothing is present, then a by default bbox is taken.", "Miguel
Casas-Sanchez <miguelecasassanchez at gmail.com>");

Put this into the documentation, not here

@@ +276,3 @@
+  grabcut->facepos.y = 77;
+  grabcut->facepos.width = 60;
+  grabcut->facepos.height = 70;

What are these magic number? :)

@@ +334,3 @@
+        if (abs (w) > 2)
+          grabcut->facepos.width = (int) w;
+        if (abs (h) > 2)

Why these checks for >2?

@@ +377,3 @@
+  }
+
+ 
//////////////////////////////////////////////////////////////////////////////

No C++/C99 comments please, use /* */

@@ +422,3 @@
+
+
+// copied, otherwise only available in C++

Can't you just use the C++ variants of these? Just make the file a C++ file :)

-- 
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