Two Image show in PC with Used pyopenmv_multi

Hello Eevery One! I want to show two Image from two Openmv4 snapshot(left side/right side) In same Windows with used script.But as follow script as show Image2.How solve this issue:

#!/usr/bin/env python2
# This file is part of the OpenMV project.
# Copyright (c) 2013-2019 Ibrahim Abdelkader <>
# Copyright (c) 2013-2019 Kwabena W. Agyeman <>
# This work is licensed under the MIT license, see the file LICENSE for details.
# An example script using pyopenmv to grab the framebuffer.

import sys
import numpy as np
import pygame
import pyopenmv_multi as pyopenmv
from time import sleep

select_Rect = pygame.Rect(0, 0, 0, 0)

# init pygame

if len(sys.argv)!= 5:
    print ('usage: <serial1 port> <script1> <serial2 port> <script2>')

with open(sys.argv[2], 'r') as fin1:
    buf1 =

with open(sys.argv[4], 'r') as fin2:
	buf2 =

portname1 = sys.argv[1]
portname2 = sys.argv[3]
connected1 = False
connected2 = False
for i in range(10):
        # opens CDC port.
        # Set small timeout when connecting
        pyopenmv.init(portname1, baudrate=921600, timeout=0.3)
        pyopenmv.init(portname2, baudrate=921600, timeout= 0.3)
        connected1 = True
        connected2 = True
    except Exception as e:
        connected1 = False
        connected2 = False

if not connected1 and not connected2:
    print ( "Failed to connect to OpenMV's serial port.\n"
            "Please install OpenMV's udev rules first:\n"
            "sudo cp openmv/udev/50-openmv.rules /etc/udev/rules.d/\n"
            "sudo udevadm control --reload-rules\n\n")

# Set higher timeout after connecting for lengthy transfers.
pyopenmv.set_timeout(portname1, 1*2) # SD Cards can cause big hicups.
pyopenmv.set_timeout(portname2, 1*2)
pyopenmv.enable_fb(portname1, True)
pyopenmv.enable_fb(portname2, True)
pyopenmv.exec_script(portname1, buf1)
pyopenmv.exec_script(portname2, buf2)

# init screen
running = True
fullscreen = True

Clock = pygame.time.Clock()
font = pygame.font.SysFont("monospace", 15)

while running:

    # read framebuffer
    fb1 = pyopenmv.fb_dump(portname1)
    fb2 = pyopenmv.fb_dump(portname2)

    if fb1 != None and fb2 != None:
        # create image from RGB888
        image1 = pygame.image.frombuffer(fb1[2].flat[0:], (fb1[0], fb1[1]), 'RGB')
        image2 = pygame.image.frombuffer(fb2[2].flat[0:], (fb2[0], fb2[1]), 'RGB')

        # TODO check if res changed
        screen1 = pygame.display.set_mode((fb1[0], fb1[1]), pygame.DOUBLEBUF, 32)
        screen2 = pygame.display.set_mode((fb2[0], fb2[1]), pygame.DOUBLEBUF, 32)

        fps = Clock.get_fps()
        # blit stuff
        screen1.blit(image1, (-50, -50))
        screen2.blit(image2, (50, 50))
        screen1.blit(font.render("FPS %.2f"%(fps), 1, (255, 0, 0)), (0, 0))       

        # update display
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
             running = False
        elif event.type == pygame.KEYDOWN:
            if event.key == pygame.K_ESCAPE:
                running = False
            if event.key == pygame.K_c:
      , "capture1.png")
      , "capture2.png")
            if event.type == pygame.VIDEORESIZE:
                size = event.size
                width, height = size
                screen = pygame.display.set_mode(size, RESIZABLE)


Thanks Advance!

Draw the two images side by side ? Anyway, this is a pygame question I’m sure you’ll find a lot of examples.