<div dir="ltr">Thank you !</div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-03 20:49 GMT+02:00 Thiago Sousa Santos <span dir="ltr"><<a href="mailto:thiagossantos@gmail.com" target="_blank">thiagossantos@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Apr 3, 2017 at 11:14 AM, Damien Picard <span dir="ltr"><<a href="mailto:picard.damien@gmail.com" target="_blank">picard.damien@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>Due to an issue in opencv4tegra, I can not capture from my UVC webcam using OpenCV. To get round this problem, I'm trying to use GStreamer and its Python bindings to capture jpeg images from the webcam.<br><br></div>To do that, I adapt<a href="https://gist.githubusercontent.com/willpatera/7984486/raw/54b71f20b6a055839e44d59663ee4783042305cf/gst-appsink-opencv.py" target="_blank"> this tutorial</a> with a custom pipeline.<br></div>Currently my pipeline looks like this :<br><br></div>v4l2src ! image/jpeg,width=1920,height=1<wbr>080 ! jpegdec ! videoconvert ! appsink name=sink caps=video/x-raw, format=(string){BGR, GRAY8}; video/x-bayer,format=(string){<wbr>rggb,bggr,grbg,gbrg}<br><br></div><div>(The function that convert gstreamer to opencv array is exactly the same as in the tutorial)<br></div><div><br></div>It works (maybe the colors are not the good ones, but I'm not sure), but I'm wondering if there is a way to retrieve the jpeg images directly from gstreamer ? By this way, I will decode them using OpenCV and I hope that it could, at least, limits processing.<br></div></div></blockquote><div><br></div></span><div>Not sure if decoding inside opencv or in gstreamer itself makes any difference but yes you can have gstreamer pass the jpeg images to you.<br><br></div><div>If you pay attention to your pipeline, it contains the 'jpegdec' element that is the one decoding jpegs into a raw format that later gets sent to appsink and into your application. So, you should just remove jpegdec and videoconvert and you will have jpeg images delivered directly to appsink. Remember to also remove the caps restrictions from appsink so it can accept jpeg input. Something like:<br><br>v4l2src ! image/jpeg,width=1920,height=1<wbr>080 ! appsink name=sink<br><br></div><div>Hope this helps,<br> <br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span class=""><div dir="ltr"><div><br></div>Thank you in advance.<span class="m_-6354086088761546610gmail-HOEnZb"><font color="#888888"><br clear="all"><div><div><div><div><div><div><div><br>-- <br><div class="m_-6354086088761546610gmail-m_1484962628311915424gmail_signature"><div dir="ltr">Damien Picard<br><a href="http://www.editions-eni.fr/livres/gwt-google-web-toolkit-developpez-des-applications-internet-riches-ria-en-java/.97a1a26e7d5be94763fc45ac2a1e961a.html" target="_blank">Expert GWT</a><br>Mob : 06 11 51 47 78</div></div>
</div></div></div></div></div></div></div></font></span></div>
<br></span>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesk<wbr>top.org</a><br>
<a rel="noreferrer" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-dev<wbr>el</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_-6354086088761546610gmail_signature">Thiago Sousa Santos</div>
</font></span></div></div>
<br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Damien Picard<br><a href="http://www.editions-eni.fr/livres/gwt-google-web-toolkit-developpez-des-applications-internet-riches-ria-en-java/.97a1a26e7d5be94763fc45ac2a1e961a.html" target="_blank">Expert GWT</a><br>Mob : 06 11 51 47 78</div></div>
</div>