Getting Remote Display using USB Lan with BeagleBone Black

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

 

Prerequisites:

  1. BeagleBone Black
  2. Mini USB cable
  3. Webcamera compatible with Linux
  4. 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.

sudo ifconfig

Open a terminal and type the following

ssh -X root@beaglebone.local

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.!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s