Life Of Navin

Random Musings, Random Bullshit.

kc

Best Of: Movies of 2016

2016 has been an amazing year at the movies, with some amazing work making it to the big screen through the year. The expected hits were mostly misses (oh Batman vs Superman!), save a few exceptions (I honestly liked movies ranging from the silly Suicide Squad,  right up to the masala-fied Dangal). But looking back at the year, I can safely say that this year had many gems. Here are my top recommendations (in descending order).

Note: These may not be movies released in 2016, but contemporary movies I watched through the year. I think it's safe to say all these movies released post 2014.

Wild Tales (Trailer)
Let's be honest. As humans, anger is almost certainly the one emotional response which we all share. And we all react differently to it. Anyone who says they don't get angry is straight out lying (Munnabhai, you lying schmuck)! Wild Tales is an Argentinean movie which features 6 short stories, all centered around the central concept of anger, and different responses to it. A peach of a movie, with beautiful stories which are all relatable. Dark humour all through the movie, and an especially amazing performance in the final story (which also happens to be the longest). Argentinean cinema rarely gets it's dues but hopefully this movie puts some more light on an amazing filmmaking community.

Kimi no Na wa. (Trailer)
Anime movies are usually very hit or miss. They're extremely intricate, very beautiful visually (Go watch Paprika if you don't believe me), and deeply intertwined with Japanese culture. Kimi no Na wa is a all of those, and more! A perfect love story, a perfect fantasy story, well, just perfect. If you don't believe me, then just know that this movie is being nominated (and winning) Best Movie in innumerable film festivals. Yes, Best Movie, not Best Animated Movie. That in itself says a lot. The director Makoto Shinkai is being hailed as the next Hayao Miyazaki, and I think that's a title he truly deserves. Kimi no Na wa makes you realize how beautiful life is and touches you in ways very few movies can.

Kimi no Na wa.

Victoria (Trailer)
Remember when Birdman came out last year and everyone went ga-ga over the single shot nature of the movie? And then were disappointed when they found out it was all thanks to innumerable camera tricks and extremely clever editing? Well, what if you could really make a movie in a single take? That's what Victoria is. An entire movie in one take. Brilliant direction, brilliant story, a cinematographer who deserves every accolade that has been thrown at him/her, and a set of performances by the entire cast (Especially notice the cast members in the background). Apparently the director said he'd do 3 takes of the movie before going to plan B, which was a normal edited movie. What we see is take 3. I've watched the movie multiple times, just trying to count the number of things that could go wrong in this, and it's mind boggling how this movie even exists in the form that it does.

A Hard Day (Trailer)
I have a friend who loves to remind everyone that the Koreans really know how to make good thrillers, while Indian directors know how to make bad ripoffs of the same. A Hard Day follows in that tradition. An intense, elaborate, smart thriller which never lets off from start to the end, and leaves you gasping for breath. Yes, the title is a reference to the fact that the movie is based on 24 hours in the life of the protagonist. And boy is it a ride! Every character has shades of grey, and every plot device, from the very believable to the downright nonsensical, all drive this movie towards a strong climax. This one for fans of Tarantino.

A Hard Day

10000 KM (Trailer)
Ah, long distance relationships. This movie is very personal to me for multiple reasons. Anyone who says long distance is easy is kidding themselves. I think we've all come across the way in which distance messes up things, be it in friendships, or love, or anything else. And this film does a great job of showcasing the same. It's never the big things that change. It's the big changes that happen one tiny change at a time. Beautiful performances by the lead cast, and a simple story told beautifully, is what makes this movie what it is. This movie is similar to Kimi no Na wa in a thousand ways, and different in a million ways. Truly a movie with heart.

Thithi (Trailer)
Indian cinema, with it's Sultans and RaOnes and Happy New Years, makes you want to lose faith in the moviemaking in the country. But then a movie like Thithi comes around, and you're instantly out of things to complain about. A non-professional cast, a young director, a quirky story, and fearlessly honest filmmaking is what this movie is all about. Telling the story of men from 3 generations of a family in a rural village in Karnataka, each having their own expectations from life, Thithi manages to do the near impossible: Create a relatable story from a situation that almost none of us have or will ever be in. You'll laugh, and you'll cry, and you'll spend a much longer time thinking about how life differs for those of us outside of our cozy little cities. This movie brought back fond memories of the iconic The Gods Must Be Crazy.

Thithi

Saat Uchakkey
(Trailer)
Every once in a while there comes about a movie that is so un-abashedly desi, so unabashedly crude, so slapstick, yet so beautifully brought together that you can't help but applaud the execution. When Delhi Belly came out I was the most disappointed because most of the humor was shitty (pun intended), and most of the swearing (which was the USP of the movie) was very forced. Saat Uchakkey fixes all of that. If you have close friends from the North, then watch this movie with them. Yes, it's vulgar. Yes, it's silly. And yes, it's proud of it's shortcomings. But then again, doesn't vulgar, silly and proud of it's shortcomings describe a large majority amongst us? You have the expected brilliant performances by Kay Kay Menon, Manoj Baypayee. And Aditi Sharma shines as well. The ending was a little disappointing, and Anupam Kher was extremely underused, but overall it's the kind of movie that Bollywood really should make more often.

Honourable Mentions (in no particular order):
DangalMountains May DepartPhobiaVisaraanaiAquariusTimbuktu and Theeb

Go on, get yourself a tub of popcorn and set yourself down for a movie marathon. :)

.pill { color: #0000FF }



Reality is merely

an illusion,

albeit a very

persistent one.
- Albert Einstein

Collaborative Neural Network Mona Lisa


Just give it a couple of seconds to get set up.
Get a modern browser.

You are now part of a collaborative neural network painting project. What you see is a neural network's approximation of Leonardo da Vinci's masterpiece. If you're on this page, the network begins to use your browser resources to further train itself. The network itself is saved as a checkpoint after a predetermined number of training steps. Anyone visiting the page starts off from the network of the last saved checkpoint.

The network has been setup to train itself very slowly, so it should not eat up too many resources, but in case it does, I apologize in advance. :)

This experiment is powered by ConvNetJS

OpenCV on Android with Java SDK and JNI - Part 2

In Part 1, we set up our Android Studio workspace and project to use the OpenCV4Android SDK. But what if some of my OpenCV code is not in Java but in C/C++? What we need to do is ensure that the C/C++ code is also loaded as part of your APK, and is linked correctly. We already set up the NDK in Part 1, so now we can use it to accomplish the task at hand. This is how you can do that:
  1. Open up app -> build.gradle and add the following just before buildtypes

    • Basically this overwrites the default ndkBuild task and instead asks it to build from src/main/jni . Also, it defines a build script (Android.mk) and a NDK app Makefile (Application.mk) and outputs stuff into src/main/jniLibs. Remember jniLibs? That's where we had previously added the architecture specific opencv_java3.so files. Turns out that .so files written to that directory are included in the final build for a given architecture. So what we'll do is build our code into .so files and add them into the jniLibs directory for the given architecture
  2. Create a directory jni inside app -> src - > main. This location should contain our native C++ source code. Go ahead and create 3 files. A C++ file here named native-lib.cpp, and 2 files named Application.mk and Android.mk respectively.

  3. Add the following content into Android.mk, Application.mk and native-lib.cpp respectively.
    • You'll have to provide the path to the OpenCV4Android SDK on line 7 of Android.mk
    • Also, in Application.mk , we mention which architecture we are building for (in my case, armeabi-v7a). You can change it as per your architecture. 
    • The code in native-lib.cpp  simply takes an OpenCV Mat object (referenced by it's address) and runs Canny Edge detection on it, and saves the result back in the same address.
    • If you want to know why the esoteric naming of methods in native-lib.cpp, it's because JNI needs to be given methods in that format. Read this to know more about this.
  4. Okay, so we have native C++ code, and a way to build it. Finally, we just need to load this native code through Android and call it's methods. We first load the native library by loading the library statically. This can be done by using System.loadLibrary. Our static block will now look like this

  5. We do this by first defining the native method in MainActivity.java just before the closing parenthesis.
    • Note that the name of the method in Java and C++ are strongly correlated. C++ names are basically named as Java_packagename_classname_methodname. Make sure you are following this convention, otherwise things WILL break.
  6. Finally, all we have to do is make the call to the native method we've defined. Replace the onCameraFrame method we have with the following:

    • As can be seen, this code reads an image from the camera, converts it to greyscale, passes it to the native C++ code (explained above) and then returns the result back to the display. 
  7. Now simply run MainActivity. If the build goes correctly, you should see libnative-lib.so is added to the jniLibs directory under the architecture you're building for, and when the app is pushed to your device, it shows you realtime edge detection.
    libnative-lib.so added to jniLibs
    Running the app. The thumbs up says it all!
That's it! So now we have Android + OpenCV4Android SDK + native C/C++ code working together to perform realtime computer vision tasks. In fact, there are ways in which you can further improve performance of JNI, but let's talk about that some other time.

codex pulchra est

Prologue

Finally after all these years, here's to the beginning of what was there, what is there and hopefully what will remain!! So here are my thoughts & words -Online!!

Blog Archive