Skip to main content

Posts

Showing posts from March, 2016

Face detection and live filters

Live video filters are becoming a popular trend fueled by Facebook (through their purchase of Msqrd) and Snapchat incorporating the features into their apps. These filters apply images or animations to your face using face tracking software. This technology has been around for awhile but is becoming increasingly more common due to the powerful CPU's that our mobile phones now have. Google provides an API that provides face tracking abilities through the Google Play Services library called Mobile Vision. I'm going to use their API to build a basic live filter app. The end result will look something like this:


    The bounding box wraps around the detected face and the sunglasses are the filter I chose (which is just a PNG image) which are drawn over the eyes. You could use any PNG image (with alpha for the background) you want, you will just have to adjust the layout according to where the image should be displayed. As you move your head, the box and sunglasses are redrawn…

Easy View Injection with Butter Knife

Butter Knife is an easy to use View Injection library. It significantly cleans up some boiler-plate code, specifically dealing with setting up Views. For whatever reason I haven't used it until recently but it is easy to adapt to and greatly reduces the amount of code I have to write. As an aside I would like to point out that Square really does a great job with their libraries (Butter Knife is a library by Jake Wharton a developer at Square). Not only are they coded really well but they're also open source and they have so many significant ones (Picasso, OkHttp, Retrofit, Dagger, etc).

Note: In some of my code snippets I use private variables for the Views but when using Butter Knife, the Views must be public. 

    Butter Knife is so easy to use you really don't need a tutorial since they cover most use cases on its Github page. But either way we're going to have a look at how to use the library and compare it to how you would normally code without it. First, let'…

Tinder mockup, Retrofit, and Gson

It's ironic that the larger a company becomes, even with all the resources it obtains, the slower and less influential it is. This is why larger company's tend to buy out the newest start-ups. But once owned by a larger company, the company hardly innovates and is very slow to release updates (perhaps due to the internal bureaucracy). Sometimes this results in a sturdy yet not so exciting product. However, sometimes I've noticed it results in a worse product (maybe due to them overly complicating their product in an attempt to accommodate as much people as possible). I'm not sure if this is the case with Tinder (I don't know if they were bought out by any larger company) but I know they have become very popular (maybe?) and I have noticed a seemingly steady decline in the quality of their product.

    Over time, I have noticed many annoying problems with their app. I have provided feedback to them via the app's feedback option and have even speculated as w…