0

I'm trying to display a window using Tkinter above (topmost) to the preview window displayed when running raspivid, but I'm unable to do so.

Python Code:

from Tkinter import *

root = Tk()
root.title("Test Topmost")
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
root.geometry("550x250+%d+%d" % (screen_width/2-275, screen_height/2-125))
root.configure(background='gold')
root.lift ()

mainloop()

I've tried this and a few different approaches to no success. Has someone managed to get it working?

Note: I do need to the preview window to be visible.

1

You can use picamera or pygame-camera Picamera is useful tool to take picture and capturing videos

but you can't add on layers like buttons on preview in picamera , it stays top of everything on screen ,also you can only add images as a layer on camera preview

however you can use pygame to preview camera and add some buttons or images on preview , but you can only take pictures , it is not perfect to capturing videos.

0

Similar to this answer

The preview image is displayed by directly manipulating the GPU overlaying the preview on top of what ever is currently displayed (that's why it works in the text console too). So you cannot use Tk to display things on top of the preview.

You could try changing the size of the preview so it does not overlap the window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.