USB Lan capable of sharing internet over the USB for BeagleBone as shown in our previous post can also be used to get display windows over LAN especially on running Image processing stuff. This post will discuss on how to obtain remote display on USB of BBB when running OpenCV codes.
- BeagleBone Black
- Mini USB cable
- Webcamera compatible with Linux
- SD Card with latest official Debian Image
After plugging in the USB Cable to your computer, make sure you get the Ethernet address on the host sytem showing 192.168.7.1 as the ipaddress when typing the following in your terminal.
Open a terminal and type the following
ssh -X firstname.lastname@example.org
You have now sucessfully logged into your beaglebone terminal.
Run a sample program in opencv as shown below
import numpy as np import cv2 cap = cv2.VideoCapture(0) if cap.isOpened() < 0: print 'camera cannot be opened' quit() cap.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH,320) cap.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT,240) while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Display the resulting frame cv2.imshow('frame',gray) if cv2.waitKey(30)>0: break # When everything done, release the capture cap.release() cv2.destroyAllWindows()
User can see the figure window inside the host system itself.!!