Cross-compiling OpenCV for iPhone

In Uncategorized on November 24, 2010 at 9:33 pm

If you are here just to cross-compile OpenCV, follow these simple instructions.  The older post is a little more detailed, error-prone, pedantic, and maybe out of date.

If you want to cross-compile OpenCV from source code, you can do by next steps.

  1. Building OpenCV 2.1 requiers CMake. You can easily install it by using MacPorts, or follow the installation instructions at the CMake website.
    % sudo port install cmake
  2. Clone this project from github, then move into the project directory
    % git clone git://github.com/gonzojive/iphone_opencv_test.git
    % cd iphone_opencv_test
  3. Download the source code for OpenCV from Sourceforge. Save OpenCV-2.1.0.tar.bz2 into the project root.
  4. Use the provided Makefile:
    % make

This will extract the downloaded archive, apply a patch to the OpenCV code, generate appropriate cmakefile suport using the opencv_cmake.sh script, and finally make the static libraries for simulator and device.  The libraries will be in the opencv_{device,simulator} directories, and may be linked in XCode etc.

In search of state-of-the-art barcode reader software

In Uncategorized on August 3, 2010 at 2:09 am

I have tried out a few different software libraries for scanning ISBN/EAN-13 barcodes with my iSight camera, but I am disappointed by the results.  The input I am providing the software is 640×480, noisy, poorly focused pictures of ISBNs on the backs of my textbooks.  I have concluded that all open source barcode readers are unfit for cheap webcams without further improvement.

I would ideally like to use a $30 webcam to scan books and other products with off-the-shelf open-source software, for use in some inventory management software.  They do make specialized barcode scanner hardware for this purpose, but the computer vision enthusiast in me sees no reason why we should not have a good webcam solution in 2010.

Software that could not recognize these images:

  • zxing
  • zbar

Software I did not try:

What’s missing from open-source barcode software: science

It seems like the libraries out there now do not use large quantities of data to test out the algorithms and incrementally improve them.  I am talking about a dataset typical in a supervised learning project with thousands of example images with corresponding labels.  In this case, it would be helpful to have two different classes of examples in a dataset.  For each image, it would be helpful to have

  1. the pixel coordinates of the corners of the barcode image
  2. the barcode value

With this sort of data, we could begin to compare the performance of the barcode libraries out there.  A fairly large dataset could be generated synthetically, or one could be created relatively easily from real-world data as well.  See this thread about using a tex library to generate EAN-13 barcodes.

I don’t have any brilliant insights about how to accomplish great results, but one thing I have noticed is that no library seems to make use of the english characters printed at the bottom of EAN barcodes.  This could probably be used in conjunction with the barcode data to further improve results, since OCR software is super accurate these days.

iSinglePayer meets the App Store

In Uncategorized on October 6, 2009 at 2:11 am

Apple approved the iSinglePayer application that was controversially rejected for being “politically charged” last week.   The app is now live and can be downloaded for free.

An update is coming soon that will move the GPS-to-district magic onto the phone itself, so your phone will not need the internet to get in touch with congress.

In the future we would like to make the application more interactive and interesting to play with.  Right now it’s just a dinky slideshow with charts and bullet points about single-payer health care and world health stats.  But it’s not the greatest.  Let us know if you would like to produce some content (like a video or code stuff).  A single-payer advocate and graphic designer would be awesome for redoing the graphics.   floatopian@floatopia.org

Other ideas would be to…

  • show how much money could be saved if we cut the private insurance bureaucracy.  administration consumes 31% of all health care costs–show how that money could be used better by letting people go on a “health care shopping spree”
  • video that describes single-payer in 90 seconds or so.  think of the video of Robert Reich explaining the public option in 70 seconds.  Somebody in congress or outside of congress should do this anyway, and we would like to put it in the app.
  • Insurance Industry roulette.  spin the wheel to decide whether you will go bankrupt due to medical expenses, whether your insurance company will pay for your surgery, or whether you will be covered at all due to a preexisting condition.
  • comparison of other health care proposals with single-payer
  • arguments  against and/or misconceptions of single payer

The app was mostly designed for those who like single-payer already, so they can call congress about it.  It is also intended to get some facts out, like how we spend 2x more on health care than nearly every other developed country.


Hope you all enjoy the app.