No Facial Detection Ubuntu 18.04

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

No Facial Detection Ubuntu 18.04

Timm Murray
I'm using the following pipeline for facial detection:

gst-launch-1.0 v4l2src device=/dev/video0 \
   ! 'video/x-raw,width=640,height=480' \
   ! videoconvert \
   ! facedetect \
   ! videoconvert \
   ! xvimagesink

This should display the video stream from my web cam to a window, with faces highlighted.  It does show the stream, but it's not drawing boxes around the faces.

I think something with my environment might be messed up, as the same pipeline had worked for me in the past.  Just not sure where to start looking.  This is on Ubuntu 18.04, GStreamer 1.14.1, and OpenCV 3.2.0.

Thanks,
Timm

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: No Facial Detection Ubuntu 18.04

Martin Vachovski

Hi Timm,


I think you should make sure you have the "profiles" for face/nose/mouth etc.

These are the Haar features that OpenCV uses for the face detection.


You can specify them with

... ! facedetect profile=[path] ! ...


According to

gst-inspect-1.0 facedetect


The default path is:

/usr/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml


As a first check. See if you have that file


Cheers

Martin




From: gstreamer-devel <[hidden email]> on behalf of Timm Murray <[hidden email]>
Sent: Tuesday, September 11, 2018 12:06 AM
To: Discussion of the development of and with GStreamer
Subject: No Facial Detection Ubuntu 18.04
 
I'm using the following pipeline for facial detection:

gst-launch-1.0 v4l2src device=/dev/video0 \
   ! 'video/x-raw,width=640,height=480' \
   ! videoconvert \
   ! facedetect \
   ! videoconvert \
   ! xvimagesink

This should display the video stream from my web cam to a window, with faces highlighted.  It does show the stream, but it's not drawing boxes around the faces.

I think something with my environment might be messed up, as the same pipeline had worked for me in the past.  Just not sure where to start looking.  This is on Ubuntu 18.04, GStreamer 1.14.1, and OpenCV 3.2.0.

Thanks,
Timm

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: No Facial Detection Ubuntu 18.04

Timm Murray
Thanks, Martin, you pointed me in the right direction.  What happens is that the Ubuntu package opencv-data puts it in /usr/share/opencv, while the plugin looks in /usr/share/OpenCV.  Adding a syslink makes it work.

Next question is if this should be fixed in the plugin, or the Ubuntu package?

Thanks,
Timm

On Tue, Sep 11, 2018 at 8:06 AM, Martin Vachovski <[hidden email]> wrote:

Hi Timm,


I think you should make sure you have the "profiles" for face/nose/mouth etc.

These are the Haar features that OpenCV uses for the face detection.


You can specify them with

... ! facedetect profile=[path] ! ...


According to

gst-inspect-1.0 facedetect


The default path is:

/usr/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml


As a first check. See if you have that file


Cheers

Martin




From: gstreamer-devel <[hidden email]> on behalf of Timm Murray <[hidden email]>
Sent: Tuesday, September 11, 2018 12:06 AM
To: Discussion of the development of and with GStreamer
Subject: No Facial Detection Ubuntu 18.04
 
I'm using the following pipeline for facial detection:

gst-launch-1.0 v4l2src device=/dev/video0 \
   ! 'video/x-raw,width=640,height=480' \
   ! videoconvert \
   ! facedetect \
   ! videoconvert \
   ! xvimagesink

This should display the video stream from my web cam to a window, with faces highlighted.  It does show the stream, but it's not drawing boxes around the faces.

I think something with my environment might be messed up, as the same pipeline had worked for me in the past.  Just not sure where to start looking.  This is on Ubuntu 18.04, GStreamer 1.14.1, and OpenCV 3.2.0.

Thanks,
Timm

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: No Facial Detection Ubuntu 18.04

Nicolas Dufresne-5
Le mardi 11 septembre 2018 à 18:30 -0500, Timm Murray a écrit :
> Thanks, Martin, you pointed me in the right direction.  What happens
> is that the Ubuntu package opencv-data puts it in /usr/share/opencv,
> while the plugin looks in /usr/share/OpenCV.  Adding a syslink makes
> it work.

This feels familiar.

>
> Next question is if this should be fixed in the plugin, or the Ubuntu
> package?

The configure scripts in gst-plugins-bad does:

  if test -d "$PKG_CONFIG_SYSROOT_DIR/$OPENCV_PREFIX/share/opencv/"; then
    AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["opencv"], [OpenCV path name])
  else
    AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["OpenCV"], [OpenCV path name])
  fi

So maybe OpenCV was rebuild, and installed in different path, but gst-
plugins-bad was not ? (meson.build does exactly the same)

>
> Thanks,
> Timm
>
> On Tue, Sep 11, 2018 at 8:06 AM, Martin Vachovski <
> [hidden email]> wrote:
> > Hi Timm,
> >
> > I think you should make sure you have the "profiles" for
> > face/nose/mouth etc.
> > These are the Haar features that OpenCV uses for the
> > face detection.
> >
> > You can specify them with
> > ... ! facedetect profile=[path] ! ...
> >
> > According to
> > gst-inspect-1.0 facedetect
> >
> > The default path is:
> > /usr/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml
> >
> > As a first check. See if you have that file
> >
> > Cheers
> > Martin
> >
> >  
> > From: gstreamer-devel <
> > [hidden email]> on behalf of Timm
> > Murray <[hidden email]>
> > Sent: Tuesday, September 11, 2018 12:06 AM
> > To: Discussion of the development of and with GStreamer
> > Subject: No Facial Detection Ubuntu 18.04
> >  
> > I'm using the following pipeline for facial detection:
> >
> > gst-launch-1.0 v4l2src device=/dev/video0 \
> >    ! 'video/x-raw,width=640,height=480' \
> >    ! videoconvert \
> >    ! facedetect \
> >    ! videoconvert \
> >    ! xvimagesink
> >
> > This should display the video stream from my web cam to a window,
> > with faces highlighted.  It does show the stream, but it's not
> > drawing boxes around the faces.
> >
> > I think something with my environment might be messed up, as the
> > same pipeline had worked for me in the past.  Just not sure where
> > to start looking.  This is on Ubuntu 18.04, GStreamer 1.14.1, and
> > OpenCV 3.2.0.
> >
> > Thanks,
> > Timm
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel