Hello,
I see a common practice in image processing to gain improve the speed scaling down the image or getting the pyramid of an image, so the process (for example object detection) is done on the scaled image and the output of the process mapped to the original one by applying a scale factor for example. I wonder if there is an element available in GStreamer that allows me to whether scale down or apply a pyramid while keeping the original buffer, or maybe you can suggest something different. And... I think that using a tee may be a solution, but would be annoying to work with multiple branches in the pipeline (at least to me) because I am not sure if in that case I believe I would have to synchronize both branches. Thanks, Fabián Orccón _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le dimanche 21 juillet 2019 à 23:18 -0500, Fabián Orccón a écrit :
> Hello, > I see a common practice in image processing to gain improve the speed > scaling down the image or getting the pyramid of an image, so the > process (for example object detection) is done on the scaled image > and the output of the process mapped to the original one by applying > a scale factor for example. Seems like a good practice. > > I wonder if there is an element available in GStreamer that allows me > to whether scale down or apply a pyramid while keeping the original > buffer, or maybe you can suggest something different. And... I think > that using a tee may be a solution, but would be annoying to work > with multiple branches in the pipeline (at least to me) because I am > not sure if in that case I believe I would have to synchronize both > branches. Indeed using a tee would require to sync and match the frames, which seems complex. For single filter, you could hide the scaling in the element (some of the OpenCV element do that, but they are not yet all ported). But then it's annoying if you want to chain multiple filters. In absence of a defacto standard, what I may suggest is to create your down GstMeta, and attach the scaled down image to your original image as a meta. Then all you need is a library to create the meta when missing, that meta will simply ignored in elements that aren't aware of it. > > Thanks, > Fabián Orccón > > _______________________________________________ > 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 |
On Tue, Jul 23, 2019 at 1:10 AM Nicolas Dufresne <[hidden email]> wrote:
> In absence of a defacto standard, what I may suggest is to create your > down GstMeta, and attach the scaled down image to your original image > as a meta. Then all you need is a library to create the meta when > missing, that meta will simply ignored in elements that aren't aware of > it. > To clarify, elements that passthrough the buffer like queue, tee, imagefreeze, etc, will (or should) leave the meta as-is, but elements that transform the buffer (encoders, converters, compositor, etc) may drop it. Cheers, Nirbheek _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le mardi 23 juillet 2019 à 12:19 +0530, Nirbheek Chauhan a écrit :
> On Tue, Jul 23, 2019 at 1:10 AM Nicolas Dufresne <[hidden email]> wrote: > > In absence of a defacto standard, what I may suggest is to create your > > down GstMeta, and attach the scaled down image to your original image > > as a meta. Then all you need is a library to create the meta when > > missing, that meta will simply ignored in elements that aren't aware of > > it. > > > > To clarify, elements that passthrough the buffer like queue, tee, > imagefreeze, etc, will (or should) leave the meta as-is, but elements > that transform the buffer (encoders, converters, compositor, etc) may > drop it. If a transform was made on the buffer, I think removing the meta is the right behaviour since the scale down would no longer match. The proposal I made only make sense for carrying the scale down image between the image processing elements, assuming no changes to the main image is made other then maybe some overlays. > > Cheers, > Nirbheek > _______________________________________________ > 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 |
Free forum by Nabble | Edit this page |