based on the example ‘image_transfer_jpg_streaming_as_the_remote_device_for_your_computer’ I wrote a script which take two images one with a uv-illumination turned on and one with the uv-illumination turned off. I calcuate the difference image. I’m able to stream the difference image or image1 or image 2. Is it possible to stream all 3 images. Waht ist the best practice for this task?
Allocate a frame buffer that’s 3x the width and draw each image on that and then send that frame buffer.
I tried to do this but I don’t know how. I used
sensor.alloc_extra_fb(3*sensor.width(), sensor.height(), sensor.GRAYSCALE)
to allocate the framebuffer. But how do I draw the images on the buffer?
buf = sensor.alloc_extra_fb(3*sensor.width(), sensor.height(), sensor.GRAYSCALE) buf.draw_image(image1, <args>) buf.draw_image(image2, <args>)
Sorry, I scrolled several times through the image library docs but missed ‘draw_image’.
But now I works! Thanks!