This isn't really what i meant since those just seem to overlay on a static image and the others use either a face tracking feature or its tracking a plane but what i meant was to just overlay the image using the live camera feed and have it just boot to the script upon activation.HermannSW wrote: ↑Sat Nov 16, 2019 4:43 amC++: https://answers.opencv.org/question/187 ... -opencv-c/
Python: https://stackoverflow.com/questions/140 ... 4#14102014
I already have alpha blending sample in my "bash i420toh264 pipeline" for on the fly Raspberry video processing while recording:
https://github.com/Hermann-SW2/userland ... a-blending
Overlaying image is not that difficult there too, just has to be split over the Y, U and V blocks.
I am sure that can be done in OpenCV, though OpenCV will add latency to the video stream.Church Lenard wrote: ↑Sat Nov 16, 2019 4:57 amThis isn't really what i meant since those just seem to overlay on a static image and the others use either a face tracking feature or its tracking a plane but what i meant was to just overlay the image using the live camera feed and have it just boot to the script upon activation.
Code: Select all
$ echo -e "P5\n1640 922\n255\n" >white.pgm $ head --bytes $((1640*922)) /dev/zero | sed "s/\x00/\xFF/g" >>white.pgm $ jpegtopnm Reticle.jpg > Reticle.pnm jpegtopnm: WRITING PPM FILE $ pnmcomp -align=center -valign=middle Reticle.pnm white.pgm | ppmtopgm > Reticle.pgm $
just tried the sample codes they had and neither would draw or display anything it would only show the camera feed.6by9 wrote: ↑Sat Nov 16, 2019 5:41 pmDo you need the overlay on an encoded stream of some form, or just on the HDMI display?
If the latter then just add an extra overlay using either the DispmanX API, or MMAL video_render component. PiCamera provides a simple API for adding an extra overlay, and should work even if you're not using PiCamera for driving the camera. See https://picamera.readthedocs.io/en/late ... he-preview for details.
correct but i had thought that topic had died out since it took me almost a year to compile opencv and it turns out the make -j4 command was the culpritgordon77 wrote: ↑Sat Nov 16, 2019 6:37 pmAre you trying to do the same as previously?
https://www.raspberrypi.org/forums/view ... p?t=239466