Hello ,
I am am streaming images of a product that must be rotated to the correct position the capture an image. I am us the live stream to view the position of the product , when the position is good I have to close the stream window and the image is saved.
I need to reopen the stream window and reposition the product and capture another image 8 times.
Can the stream remain open and somehow capture images on demand while displaying the stream.
All I have done is add the im.save after app.exec_() in the tutorial code QmlStreamDisplay.py
be aware that the example is not interactive, it just acquires images and displays them.
You have to do the saving inside the applications event loop!
For you application I suggest to add a button and a custom controller as bridge to QML. Once you receive the clicked signal just call device.device_image.save(...) inside your controller.
Thank you Andreas,
While looking at the tutorial files , C:\Program Files\STEMMER IMAGING\Common Vision Blox\Tutorial\GEVServer\CvbPy\QmlGevServer
This code looks ideal for me I just replaced the Mock.vin with the GenICam.vin for my camera and it streams live and captures images.
The code is a bit complex for me but hopefully I can wade through it.
My only issue now is that when saving an image it opens the file explorer.
QML
onClicked:
{
loadFile = false
fileDialog.folder = backEnd.desktop_path
fileDialog.open()
}
The Python code:
def save_image(self, path):
print('Saving image to ’ + path)
self.device.device_image.save(path) @Slot()
Does not appear to allow me to select a path or name the image file.
Any further suggestions would be great.
Thanks again
Mark