<commit_before>#! /usr/bin/env python
# -*- coding:utf-8 -*- 


#
# Application to capture images asynchronously
# from two AVT Manta cameras with the Vimba SDK
#


#
# External dependencies
#
import cv2
import ctypes as ct
import numpy as np
import Vimba
import Viewer


#
# Process the current image
#
def ProcessImage1( image ) :
	
	# Resize image for display
	image_displayed = cv2.resize( image, None, fx=0.3, fy=0.3 )

	# Display the image (scaled down)
	cv2.imshow( "Camera1", image_displayed )
	cv2.waitKey( 1 )


#
# Process the current image
#
def ProcessImage2( image ) :
	
	# Resize image for display
	image_displayed = cv2.resize( image, None, fx=0.3, fy=0.3 )

	# Display the image (scaled down)
	cv2.imshow( "Camera2", image_displayed )
	cv2.waitKey( 1 )



#
# Main program
#


# Vimba initialization
Vimba.VmbStartup()
vimba = Vimba.vimba

# Camera connection
camera1 = Vimba.VmbCamera( '50-0503323406' )
camera2 = Vimba.VmbCamera( '50-0503326223' )

# Live asynchronous capture
camera1.CaptureStart( ProcessImage1 )
camera2.CaptureStart( ProcessImage2 )

raw_input( 'Press enter...' )

# Cleanup OpenCV
cv2.destroyWindow( "Camera" )

# Stop image acquisition
camera1.CaptureStop()
camera2.CaptureStop()

# Camera disconnection
camera1.Disconnect()<commit_msg>Destoy all OpenCV windows.<commit_after>#! /usr/bin/env python
# -*- coding:utf-8 -*- 


#
# Application to capture images asynchronously
# from two AVT Manta cameras with the Vimba SDK
#


#
# External dependencies
#
import cv2
import ctypes as ct
import numpy as np
import Vimba
import Viewer


#
# Process the current image
#
def ProcessImage1( image ) :
	
	# Resize image for display
	image_displayed = cv2.resize( image, None, fx=0.3, fy=0.3 )

	# Display the image (scaled down)
	cv2.imshow( "Camera1", image_displayed )
	cv2.waitKey( 1 )


#
# Process the current image
#
def ProcessImage2( image ) :
	
	# Resize image for display
	image_displayed = cv2.resize( image, None, fx=0.3, fy=0.3 )

	# Display the image (scaled down)
	cv2.imshow( "Camera2", image_displayed )
	cv2.waitKey( 1 )



#
# Main program
#


# Vimba initialization
Vimba.VmbStartup()
vimba = Vimba.vimba

# Camera connection
camera1 = Vimba.VmbCamera( '50-0503323406' )
camera2 = Vimba.VmbCamera( '50-0503326223' )

# Live asynchronous capture
camera1.CaptureStart( ProcessImage1 )
camera2.CaptureStart( ProcessImage2 )

raw_input( 'Press enter to exit...' )

# Cleanup OpenCV
cv2.destroyAllWindows()

# Stop image acquisition
camera1.CaptureStop()
camera2.CaptureStop()

# Camera disconnection
camera1.Disconnect()
{'fraction_non_alphanumeric': 0.10782405605293889, 'fraction_numerical': 0.043596730245231606, 'mean_word_length': 4.234215885947047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3570431', 'n_tokens_mistral': 991, 'n_tokens_neox': 918, 'n_words': 253}