This year carwow’s hack week has found me very keen on having fun with mobile developing. In fact, together with Anson Kelly and Jessica Lascar, we have built an android app, together with a Sinatra API service.

Making the choose car journey easier

For those not familiar with carwow’s car configuration process, it involves taking a few simple steps and some knowledge around the model/engine of the car you want

Current car configuration steps

The question we asked ourselves was: can we create a visual way to make it easier/faster for users to get to the offer stage?

The main objective of this app was making this process easier and shorter, by allowing people taking pictures of cars they like and configure them automatically

Since we need quite a few informations to create a car configuration, we decided that a picture of a license plate would work just fine. In fact there are services that give you all the specs of a car just providing its license plate number.

Backend

We started right away with a discussion about which framework and libraries to use. Since we needed to extract the licence plate number we looked into several OCR libraries and eventually we chose OpenALPR, a suite of binaries and libraries built on top of tesseract.

We played around with OpenALPR, trying to figure how get the best out of it. Eventually we wrote a ruby wrapper around its binary that boiled down to

def scan_image(filepath)

`alpr -j -c gb #{filepath}`

end

Once we got the licence plate number we needed to use it to get the car informations through HPI api

Android app

Within a couple of days of readjusting the aim of what the core features of the app would be, we ended up having a basic but working prototype supporting the main functionalities:

Take a picture with the camera / Pick an image from gallery

Upload the picture to the backend and wait for the licence plate number

Present the result of the OCR processing to the user to give him the chance to edit it if it’s wrong

Present the result of the HPI api call with the car specs together with some picture and allow users to proceed with the configuration on our website

The main libraries we used are:

retrofit: type-safe REST client, that allows to make requests to APIs very easily and allows to map the returned data into POJOs which must be defined for each “resource” in the response.

glide: very useful image library that allows fetching, decoding, and displaying of a wide range of image formats

End result

It’s pretty amazing what you can do just in a few days when you’re excited about trying new stuff, that’s why we love hack weeks at carwow!

Interested in making an Impact? Join the carwow-team!

Feeling social? Connect with us on Twitter and LinkedIn :-)