Go to advanced search

by Church Lenard
Sun Nov 24, 2019 9:10 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

gordon77 wrote:
Fri Nov 22, 2019 4:09 pm
Can you provide a screenshot using cv2.namedWindow(winName), ie NO FULLSCREEN, does the image fill the screen ?
I would provide a screenshot but it wont take the images that im taking but the image does seem adequate for the windowed size
by Church Lenard
Fri Nov 22, 2019 3:58 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

gordon77 wrote:
Fri Nov 22, 2019 3:41 pm
Well that's different. What resolution is the screen?

is it hdmi ?
Its hdmi at 640x480
by Church Lenard
Fri Nov 22, 2019 3:11 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

Well I'm baffled as it works on my Pi4. upload your code as a final check #!/usr/bin/env python3 import cv2 import os invert_mask = 0 # mouse action def point(event, x, y, flags, param): global invert_mask if event == cv2.EVENT_LBUTTONDOWN: if invert_mask == 0: invert_mask = 1 else: invert_mask = 0...
by Church Lenard
Fri Nov 22, 2019 2:44 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

Did you include cv2.namedWindow(winName, cv2.WND_PROP_FULLSCREEN) cv2.setWindowProperty(winName, cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN) #!/usr/bin/env python3 import cv2 import os invert_mask = 0 # mouse action def point(event, x, y, flags, param): global invert_mask if event == cv2.EVENT_...
by Church Lenard
Fri Nov 22, 2019 1:22 am
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

You could change your monitor to 640x480. Assuming you are using the GUI.. Choose Preferences from Menu Choose Screen Configuration Choose Screens Choose HDMI-1 Choose Resolution Choose 640x480 Click on the Green Tick Choose OK I did but the image is tiny its like maybe 30% of the screen id upload ...
by Church Lenard
Wed Nov 20, 2019 7:25 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

This will show you the video size, and set it to 640 x 480... Also a new mask. #!/usr/bin/env python3 import cv2 import os import time # setup pi camera if os.path.exists('/dev/video0') == False: path = 'sudo modprobe bcm2835-v4l2' os.system (path) time.sleep(1) path = 'v4l2-ctl --set-ctrl=auto_exp...
by Church Lenard
Tue Nov 19, 2019 5:12 am
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

Hi, I already worked on a digital telescope, I advise you to use Picamera (1% of the cpu) instead of opencv (more than 20% cpu) and to display your reticle with pi3d. My program did not take more than 5% cpu with a more sophisticated screen. What is the cpu percentage after executing your program? ...
by Church Lenard
Mon Nov 18, 2019 3:31 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

Try changing it to cv2.namedWindow(winName, cv2.WND_PROP_FULLSCREEN) cv2.setWindowProperty(winName, cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN) that kinda worked but its still got the same windowed size and the rest is white edit: ok so after further inspection on this it displays nearly fullsc...
by Church Lenard
Mon Nov 18, 2019 3:02 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

This will show you the video size, and set it to 640 x 480... Also a new mask. #!/usr/bin/env python3 import cv2 import os import time # setup pi camera ... if key == 27: cv2.destroyWindow(winName) break Thank's again for that script. I have not done much with Python yet (more with MicroPython on E...
by Church Lenard
Mon Nov 18, 2019 5:20 am
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

carcela wrote:
Mon Nov 18, 2019 3:42 am
Hi,
You can use pi3d:
https://github.com/tipam/pi3d
pi 3d looks great and all but its really too much of a hassle to work in a 3d plane to switch back to a 2d plane when all i need to do now is scale up an image
by Church Lenard
Sun Nov 17, 2019 8:32 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

Try changing it to cv2.namedWindow(winName, cv2.WND_PROP_FULLSCREEN) cv2.setWindowProperty(winName, cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN) that kinda worked but its still got the same windowed size and the rest is white edit: ok so after further inspection on this it displays nearly fullsc...
by Church Lenard
Sun Nov 17, 2019 8:20 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

ok so one last question how do you make it go fullscreen instead of windowed?
by Church Lenard
Sun Nov 17, 2019 8:16 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

gordon77 wrote:
Sun Nov 17, 2019 8:07 pm
Church Lenard wrote:
Sun Nov 17, 2019 7:55 pm
gordon77 wrote:
Sun Nov 17, 2019 7:51 pm
Is the jpg in /home/pi?
its in the downloads
Copy it to /home/pi or change the script to /home/pi/Documents/Reticle2.jpg


img2 = cv2.imread('/home/pi/Documents/Reticle2.jpg')
im a freaking idiot now it works
by Church Lenard
Sun Nov 17, 2019 7:55 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

gordon77 wrote:
Sun Nov 17, 2019 7:51 pm
Is the jpg in /home/pi?
its in the downloads
by Church Lenard
Sun Nov 17, 2019 7:50 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

gordon77 wrote:
Sun Nov 17, 2019 7:46 pm
I have just spotted your earlier error message says img but it should be img2, so that means you are not loading the Reticle2.jpg. Note the capital R.
i am using Reticle2.jpg it gives the same error regardless
by Church Lenard
Sun Nov 17, 2019 7:47 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

what do you see if you run this? #!/usr/bin/env python3 import cv2 import os import time # setup pi camera if os.path.exists('/dev/video0') == False: path = 'sudo modprobe bcm2835-v4l2' os.system (path) time.sleep(1) path = 'v4l2-ctl --set-ctrl=auto_exposure=0' os.system (path) # start video cam = ...
by Church Lenard
Sun Nov 17, 2019 7:31 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

Is the camera working? The error message could suggest there is nothing in img. This may also explain your earlier problem. Did it print a size? Did you save the reticle as Reticle2.jpg? If you do ls /dev do you see Video0? i see video0 but when the script runs it just pulls up a small window thats...
by Church Lenard
Sun Nov 17, 2019 6:31 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

This will show you the video size, and set it to 640 x 480... Also a new mask. #!/usr/bin/env python3 import cv2 import os import time # setup pi camera if os.path.exists('/dev/video0') == False: path = 'sudo modprobe bcm2835-v4l2' os.system (path) time.sleep(1) path = 'v4l2-ctl --set-ctrl=auto_exp...
by Church Lenard
Sat Nov 16, 2019 8:47 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

gordon77 wrote:
Sat Nov 16, 2019 8:45 pm
This appears to be saying the video and the jpg are not the same size.
and how exactly do i find the size of the video or is there a way to work around this?
by Church Lenard
Sat Nov 16, 2019 8:30 pm
Forum: Camera board
Topic: Image overlay on live video feed
Replies: 59
Views: 3178

Re: Image overlay on live video feed

Try this... You need to save the target image below. #!/usr/bin/env python3 import cv2 import os import time # setup pi camera if os.path.exists('/dev/video0') == False: path = 'sudo modprobe bcm2835-v4l2' os.system (path) time.sleep(1) path = 'v4l2-ctl --set-ctrl=auto_exposure=0' os.system (path) ...
by Church Lenard
Sat Nov 16, 2019 6:47 pm
Forum: Camera board
Topic: Image Overlay OpenCV
Replies: 9
Views: 435

Re: Image Overlay OpenCV

gordon77 wrote:
Sat Nov 16, 2019 6:37 pm
Are you trying to do the same as previously?

https://www.raspberrypi.org/forums/view ... p?t=239466
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 culprit
by Church Lenard
Sat Nov 16, 2019 5:59 pm
Forum: Camera board
Topic: Image Overlay OpenCV
Replies: 9
Views: 435

Re: Image Overlay OpenCV

Do 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 Pi...
by Church Lenard
Sat Nov 16, 2019 5:33 pm
Forum: Camera board
Topic: Image Overlay OpenCV
Replies: 9
Views: 435

Re: Image Overlay OpenCV

for the execution part it sais "no such file or directory" for./i420toh264
by Church Lenard
Sat Nov 16, 2019 8:06 am
Forum: Camera board
Topic: Image Overlay OpenCV
Replies: 9
Views: 435

Re: Image Overlay OpenCV

OK ill try that tomorrow as it is 2:30 am where i am ill let you know how it goes
by Church Lenard
Sat Nov 16, 2019 4:57 am
Forum: Camera board
Topic: Image Overlay OpenCV
Replies: 9
Views: 435

Re: Image Overlay OpenCV

C++: https://answers.opencv.org/question/187586/how-to-show-overlay-image-over-detected-face-in-opencv-c/ Python: https://stackoverflow.com/questions/14063070/overlay-a-smaller-image-on-a-larger-image-python-opencv/14102014#14102014 P.S: I already have alpha blending sample in my "bash i420toh264 p...

Go to advanced search