Sunday, April 15, 2012

PandaBoard ES: Getting Started with Ubuntu 12.04 LTS Desktop

The following is a basic starter guide in getting Ubuntu 12.04 LTS Desktop running on the recently released PandaBoard ES:

1. Download the Ubuntu 12.04 LTS pre-installed desktop image for OMAP4 here (direct download link: ubuntu-12.04-preinstalled-desktop-armhf+omap4.img.gz).

2. The downloaded file from Step 1 will be a GZIP archive containing a RAW file - use ImageWriter for Windows to write this RAW image file to an SD card [I used a Sandisk Extreme Class 10 16GB 30MB/s SDHC].

Note: It also good practise to check the MD5 hash of the downloaded GZIP archive before doing this. This can be done by loading the archive in ImageWriter and ticking the MD5 check-box. The program will then calculate and display the hash (takes a few minutes). Compare this value with value contained in the "MD5SUMS" file on the download page in Step 1.

3. Setup the PandaBoard ES hardware:
  • Insert the SD card prepared in Step 2.
  • Use the HDMI connector adjacent to the USB/Ethernet sockets to connect the PandaBoard to a suitable display. I used a Dell U2412M UltraSharp 24” monitor with a DVI-HDMI adapter.
  • Connect a USB keyboard and mouse. I connected these via a powered USB hub.
  • Finally, connect a 5V DC power supply to the board (ensure that it is centre-pin positive). I used a 3A rated supply.

4. The PandaBoard should now begin booting from the SD card after the power supply is connected (Note: Both STATUS and STATUS2 LEDs should become momentarily lit after power is connected).

If the SD card was prepared correctly, Ubuntu will first resize the image to fill the SD card and then reboot and start oem-config to prompt for localization and user info.

5. After Ubuntu has successfully booted, you may be prompted to install the PowerVR SGX propreitary graphics driver for OMAP 4. From my initial tests however, I found that this driver did not render the desktop widgets correctly. After installation of this driver, I also discovered that I couldn't bring up an instance of Terminal with the Control-Alt-T shortcut. So for the time being, I recommend using the stock graphics driver supplied with Ubuntu 12.04 LTS.

6. Finally, connect to the internet either via the on-board WiFi or Ethernet and update your Ubuntu installation by typing the following in Terminal (use Control-Alt-T to open an instance of Terminal):
$ sudo apt-get install
$ sudo apt-get upgrade
All in all, the installation procedure was extremely straight-forward with no major issues. Time-to-boot from plugging in the power supply to fully loading the Ubuntu desktop was approximately 45 seconds. One strange thing I found however is that Ubuntu (with the stock graphics drivers) does not always boot in the higher resolution of 1680x1050 - it may also sometimes boot in 1024x768. Also, choosing Restart again in Ubuntu to reboot the device does not always work - the power supply must be physically removed and re-inserted to re-boot the PandaBoard if this occurs.

UPDATE (13th May 2012):

There currently exists a yet-to-be-fixed bug in the 12.04 OMAP4 release which causes the PandaBoard to eventually freeze after certain amount of time (usually an hour or so). The following is a workaround which fixes the issue:
$ update-rc.d ondemand disable
$ apt-get -y install cpufrequtils
$ echo 'ENABLE="true" GOVERNOR="performance" MAX_SPEED="0" MIN_SPEED="0"' > /etc/default/cpufrequtils
$ cpufreq-set -r -g performance
UPDATE #2 (14th August 2012): The above mentioned bug has been patched into the mainline kernel (tested and OK with 3.2.0-1416-omap4). Run sudo apt-get upgrade after a clean install as described above.

Saturday, February 4, 2012

qt-opencv-multithreaded: v1.21 Released

A custom ROI set with canny edge detection on.

After around 6 months since I last updated my qt-opencv-multithreaded project, I've finally released what I consider, more-or-less, a "final" version of the application. A few features have been added such as the ability to choose the priorities of the capture and processing threads at run-time, as well as the option to drop frames if the image/frame buffer is full (this is useful when lag is undesirable - i.e. not every frame is processed). The interface has also been neatened and the code has been simplified as well (a lot of redundant code has been removed), making the application much more easier to modify than before (see full list of features here).

From the beginning it was my intention to keep the application simple in the hope that it would be used as the base for a range of interesting projects. I now feel that it has enough basic features to be an excellent "base application" for any computer vision application using OpenCV and Qt. As a result, any updates in the future will only address bugs in the program (please do contact me if you happen to find any!).

This "base application" was used (and is currently still being used) as the base for software written as a part of my university undergraduate thesis project (see video here). In short, the software features two extra threads with the GUI highly modified to suit the project application and over the last year or so, has proven to be highly stable.

As before, please go to the project page at Google Code to download the application and for more details (including installation and usage instructions). Any feedback/suggestions/questions would be greatly appreciated. I'd also like to thank everyone who has downloaded and tried the application so far!

Camera connect dialog showing new options to select thread priority and drop frames.

 

AVR XMEGA uC/OS-II Port (UPDATE):

I've also added v2.92.01 [currently the latest (last?) version of uC/OS-II] port files to the AVR XMEGA uC/OS-II Ports project page. Enjoy!

Links: