Wednesday, 7 September 2016

Chroma Key: Why Are Green or Blue Screens Used While Shooting Movies?

If you’ve ever loved an action/sci-fi movie so much that you couldn’t stop yourself from checking out its ‘behind-the-scenes’ videos, then you have probably noticed a rather unusual thing about the movie sets: a lot of green! With the exception of the actors and a few props scattered around them, the entire background seems to be draped in sheets of green (or blue).
300 Rise of an empire
The filming of the movie 300: Rise of an Empire using a lot of ‘greens’ (Photo Credit : moviez.su)
Do you know the reason why movie makers insist on covering their sets with this highly unusual hue of green while shooting a film?

Visual Effects and Animation

shooting a video using blue screens
Draped in blue: Blue is another widely used color during the filming of action/animation movies (Image Source: Wikipedia.org)
Since you’re most likely to see the use of green or blue screens in action, fantasy or sci-fi movies – or during weather forecast reports – it doesn’t take a rocket scientist to figure out that the green screen must have something to do with the one element that is common in all of these different media – visual effects and animation.
While shooting videos that involve a lot of visual editing, you need to consider a few things, namely things that will facilitate editing in the later stages of post production – during the shooting itself. For instance, let’s assume that you want to shoot an action scene from a superhero movie. More specifically, you want to show the actors running through ruins and constantly evading aerial attacks. You can’t actually recreate the scene in the real world, since you can’t make actors dart through actual bomb strikes (unless you want to spend millions of dollars on every take and likely end up in prison), but at the same time, you want to make the scene look as authentic as possible.
 .The avengers 2012
A still from the shoot of the movie Avengers: notice how chroma key helps to place an entirely different background in the footage (Photo Credit : tyramisu.fr

So, what you need to do is strategically place a few broken objects (e.g., damaged automobiles, rocks etc.) around the actors and install a big green screen behind them, in place of all the elements that you want to capture in the video (including the actors and props). After you’ve shot the video in this manner, the green in the background can then be replaced by any image or video during post-production to simulate a ruinous environment or aerial explosions using a technique called Chroma Key.

Chroma Key

Chroma Key is a visual effects technique widely used during post-production to superimpose images and videos on top of an image/video stream based on color hues. Also known as color keying, it makes a selected color range in the foreground ‘transparent’, which subsequently allows for the insertion of a separately filmed piece of footage or image in the selected area.
Since the rise of popularity of animation in movies and TV, this technique has become a goldmine for digital graphic experts and designers in the motion picture, newscasting and video game industries. Although it can be used in a number of ways depending on the graphical requirements, it’s primarily used for editing out (removing) the real background and replacing it with another image/footage (typically a digitally-enhanced one).
Green screen news room
How a news forecast footage is shot and artificially enhanced during post-production
For example, during a weather report telecast, the host stands in the foreground with an almost featureless background and a big green screen at the back while filming the report. However, during post-production, the green background is edited out to include maps, shapes and various animations.

Why do they specifically use green?

you could only use the color green for visual effects meme
There’s no hard and fast rule, either technologically or ethically, about using a particularly colored screen when you want to apply Chroma Key. You can use any color, such as yellow, purple, red, or pink, to use this feature. There’s no obligation to use the color green.
That being said, why is green the most commonly used color in videos and movies involving a lot of visual effects?
There are a few reasons behind this. The most basic one is the fact that green ‘stands out’ reasonably well while filming any footage. Consider this: if anything in the foreground has the same hue as the color you want to key out (in this case, green), then it will be keyed out too. For example, if the subject is wearing a green badge on his body, then that portion would be keyed out while editing, making it look like as if there’s a hole in his body. This is why you want to choose a screen with a color that has very little chance of matching anything in the foreground.
one simply does not wear something 'that' green meme
Since there’s no green in a human’s skin tone or clothing, it offers a better contrast between the subject and the background and can therefore be keyed out easily, without affecting the other elements of the picture.
Another reason that green is used is because it has the highest luminance among all the color channels (RGB), which makes green screens very bright (because of their high luminance). However, it can also cause the problem of ‘green spill’ if the lighting and the subject’s distance from the screen is optimized before shooting.
Green spill
The side-effect of green spill: notice the green reflection on the subject’s hair in the enhanced image
Most digital cameras today are based on CMOS sensors, which consist of a Bayer Pattern filter on the top for producing images. This filter produces twice as green information as it does for red and blue. This means that editors have more information to work with during post-production, which in turn produces finer pictures.
The use and popularity of green screens touches almost every domain related to virtual media, ranging from educational fields to anything that requires a more immersive and captivating form of information broadcasting. It goes without saying that if it weren’t for those giant green screens, heroes like Iron Man and Spiderman wouldn’t have looked nearly as cool!

Friday, 2 September 2016

How Do CAPTCHAs Work?

While filling out forms or taking part in online surveys, you have probably come across that annoying part where you have to look at a tiny image containing letters and numbers (often distorted or smashed together against a background to apparently make it more difficult to make out) and subsequently type those characters into a text box provided next to it.
So, what’s that stuff all about? Why does the code have to be so difficult to read? What purpose does it serve to have us re-type something that’s already there?

What is a CAPTCHA?

Captcha example
An example of a CAPTCHA (Image Source: commons.wikimedia.org)
For those who don’t know about these already, the twisted image you see above is actually an image-and-text tool, officially called a ‘CAPTCHA’, which is an acronym for ‘Completely Automated Public Turing test to tell Computers and Humans Apart’. It’s basically a type of challenge-response test (a variety of protocols where one party asks a question and the other party has to provide a valid answer to be authenticated) that’s used to determine whether a user is a human or a bot.
In essence, CAPTCHAs are a more advanced version of the Turing Test – a test developed by British innovator Alan Turing to ascertain the humanity or ‘humanness’ of the subject to which a test is being administered.
turing test
The most common type of CAPTCHA seen today was first formulated by a small group of engineers and tech enthusiasts back in 1997. It consists of a combination of distorted letters and digits (most of the time), coupled with colored backgrounds, which doesn’t make any real difference to a human looking at the screen, but it certainly complicates things if there’s a machine ‘sitting’ at the other end. Since, in this case, the administer itself is a machine (as opposed to the original Turing test, where the administer was supposed to be a human), a CAPTCHA is also sometimes referred to as a reverse Turing test.

How do CAPTCHAs work?

Traditional ‘type the letters you see in the image’ CAPTCHAs ask users to identify and submit a value (like a word or number) they see in a distorted/blurry image. These CAPTCHAs rely on the human ability to identify and comprehend visual/audio cues that would be extremely difficult to replicate in bots. Such mechanisms assume that if the user is able to make out such difficult words and patterns, they must be a human.
These types of CAPTCHAs are pretty effective, but sometimes they make the text too blurry or distorted for even humans to make out.
Captcha meme
Moreover, they require us to ‘type’ in the hidden code – an additional task that most would just prefer pass on, if possible.

Google’s “I’m not a robot” CAPTCHA

At some point in recent years, you have almost certainly come across Google’s “I’m not a robot'”reCAPTCHA, which asks you to click on a check box, sometimes followed by an additional task of clicking on similar or related pictures.
google recaptcha
Google’s reCAPTCHA (Photo Credit: Google.com)
This modern take on authentication employs a path-breaking design with reCAPTCHA to ensure maximum protection against bots, while requiring minimum effort on the part of users. It verifies the humanness of the user by examining the cues they unwittingly provide, including cookies and their IP addresses. It even examines the tiniest movements and keystroke patterns of users who frequent Google to tell them apart from bots.

What’s the purpose of CAPTCHAs?

CAPTCHAs are put in place to ensure that only actual humans engage and perform actions in a given system, rather than automated software (also called bots) that does the same thing and gives the false impression that an actual human used the system.
Dog meme
You will most likely find CAPTCHAs at the end of a purchase or online process while filling out forms, signing up on a web service, or participating in an online survey in order to ensure that the user who just interacted with the system was a real human. In other words, CAPTCHAs want to guarantee that the sign-up was done or the form was filled out by a human and not a machine.
CAPTCHAs are also used by tech giants like Google to stem “click frauds”, wherein automated bots (instead of real humans, whom the ads are actually meant for) click on pay-per-click ads and unethically generate revenue for the sites that host them.

Why do they make CAPTCHAs so hard to read?

difficult captcha
Good luck deciphering this one!
A CAPTCHA that’s easy to read is no good, as there are a number of computer programs that can scan an image and successfully predict the message based on the shapes we see in daily life, such as numbers and letters. Therefore, a CAPTCHA that’s easy to read might make things convenient for you, but it makes life easy for bots too, which is something that CAPTCHA-makers are trying to avoid in the first place!
While Google’s reCAPTCHA is a big step towards improving the existing CAPTCHA design, we can expect even smoother versions of these human-identifying tests in the future. Wouldn’t you like to have a CAPTCHA, that, without requesting that you do anything at all, just intuitively knows that you’re not a machine?
dog and baby talking meme



What Are Company Stocks?

Stocks are absolutely intrinsic to our entire economic system, yet most of us can barely call ourselves even vaguely familiar with the stock market. To change that, here are some of the basic things you need to know about company stocks before you start investing in the companies of the world.

An Introduction To Companies

Let’s first try to understand what a company is before getting into the details of stocks and shares. Imagine that you want to go into business making Walkmans. You don’t really know much about business, or Walkmans for that matter, so you would do your best to minimize your risk in this endeavor. Therefore, you create a ‘company’, which is a legal entity that is taxed separately and is essentially treated as a different ‘person’. Now, all the losses you incur in that business will not drain away your personal assets or any other company that you might own. Essentially, you are free to go bankrupt by pursuing this ridiculous business of yours!
money
Imagine that your business starts to boom right away. People really love your product and believe it’s going places. You, obviously excited by the response, want to expand your company. However, you don’t seem to have any funds, leaving you with two options: debt financing or equity financing.

Bonds and Shares

One way you can raise money is by taking out loans, either from a bank or by issuing bonds. When a company issues bonds, it basically means that it is borrowing money in exchange for a bond certificate. If a person has a bond certificate, as long as the company is not going bankrupt, that person is assured to have his/her principal amount back at a future date, along with a specified rate of interest. This is called debt financing.
Now, let’s get back to your fictional Walkman company. You don’t want to issue bonds or loans, as you don’t know if you’re going to continue to make the same amount of profit in the future. Instead, you look into equity financing. In this case, you aren’t technically borrowing money, but rather opening up parts of your company for purchase.
 
You can either be choosy and invite only strategic partners in on the party, such as a really rich sound engineer who wants to invest enough in your company to have some power in certain decision-making processes. Now, let’s say this sound engineer buys 40,000 of the total 100,000 shares of the company. Congratulations! Now you have someone who owns 40% the company, 40% of the share of profits and losses, and 40% of the voting rights when the company makes decisions.
You’re still not satisfied though, so you make the bold decision of diluting your shareholdings even further and offering new shares to outside financiers. At this point, you decide to list your company on the stock exchange market, where any person in the world can buy or sell stocks of your company!

But Why Stocks?

We’ve already discussed why it is beneficial for the company owner to consort to equity over debt. Issuing stock is advantageous for the company because it does not require the company to pay back the money or make interest payments along the way. However, why would a buyer prefer stocks over bonds when there is no guarantee of receiving your initial investment back? After all, the only thing that shareholders get in return for their money is the hope that those shares will someday be worth more than what they paid for them.
As a stockholder of your company, I would get every bit of the profit that you make, but also riding the woes of the free market right along with you. This is unlike a bondholder, who would be prioritized during the payback process before a stockholder.
In other words, if the company wins, then you win. However, if the company goes bankrupt, then you run the risk of losing your entire investment.
bankruptcy
Here is the deal. As a stockholder, I am only liable to lose my initial investment. Stocks are much more flexible than bonds, so I always have the choice to sell my stocks if I see the company losing money.
Therefore, if a new company comes up and creates a Discman that is much more user-friendly than the Walkman, then your popularity in the market will drop. You may start losing money and be well on your way to bankruptcy (sorry). As a stockholder, I notice this, and decide to sell my stocks at a rate lower than what I had bought them for. Let’s say that I had bought a stock at the price of $5, but now decide to sell it at $4 before the price drops even further. I may lose one dollar on each stock, but I deem that to be a better decision than losing all five dollars.
The Walkman company doesn’t give up, however, and you introduce a new product – a portable MP3 player that revolutionizes the music industry! My friend Bob realizes the growth potential of your company very quickly and decides to buy all the stocks that I had sold for $4 each. Now, people begin buying your new product all over the world and your net worth increases significantly. Likewise, the price of your stock also skyrockets to $8. So, while I lost $1 on every stock that I sold, Bob actually doubled his investment! Now he can sell the same stocks that I owned at a much higher rate simply because he was ready to take the risk.
Obviously, Bob knew better.
This is an extremely simplified understanding of the stock market, obviously. There are so many other factors that affect the price of stocks – the earnings of the company, analyst reports, economic trends, business and industry outlook, etc. Unlike bonds, which require you to be a passive receptor of the interest rates on your investments, investing in the stock market demands that you shrewdly take calculated risks. The greater the risks, the greater your returns could be. This is why stocks have always outperformed other investments, such as bonds or savings accounts. Over the long term, an investment in stocks has historically had an average return of roughly 10-12%!

How Does A Submarine Dive, Resurface And Navigate Underwater?

Turning a corner on a road is no big deal when you’re driving a car, but things change dramatically when you need to maneuver a downward (or upward) turn in a gigantic metallic tube – more specifically, in a submarine – operating underwater. So, what goes on inside a submarine when it dives and resurfaces?

A little Something About Submarines…

A submarine is a brilliant piece of technology specifically designed to operate underwater. It’s a special ship that has the ability to operate independently (i.e. without any external support) underwater. Initially manufactured for militaristic purposes (indeed, the biggest submarines currently in operation belong to navies from various countries), submarines these days are also used for carrying out research and experimentation underwater.
Submarine
A formidable underwater machine

How does a submarine dive and resurface?

Before we discuss how submarines break the surface and go underwater, let’s do a quick recap of an important physical phenomenon of water that you surely studied at some point in a science class: buoyancy.
Buoyancy is basically an upward force that keeps everything from wooden planks to gigantic vessels from sinking. While messing with this force can have disastrous consequences, the ability to control it can be highly advantageous.
If the weight of water displaced by an object is equal to its own weight, then it floats; otherwise, it sinks. While most boats and vessels don’t dare to mess with this equilibrium, since it keeps them afloat, submarines manipulate this effect on purpose. In order to control the buoyant force acting on it, a submarine fills/empties itself with the surrounding water to dive/resurface. A submarine consists of ballast tanks (and trim tanks too, in some models) that can be filled by either water or air according to navigational requirements.
Ballast tanks are located at different positions in different models of submarines  Ballast tanks are located at different positions on different models of submarines
It works like this: when the submarine is above the surface of the water, the ballast tanks are filled with air, which means that the overall density of the submarine is less than the water it displaces. However, when the submarine needs to dive, it releases a vent in the ballast tanks that causes the surrounding water to rush in. The crew allows the surrounding water to fill the tank until the desired depth is reached, after which the valve is closed to stop any more water from rushing in.
Submarine diving resurfacing
Ballast tanks are alternatively filled with water and compressed gas to submerge and resurface a submarine
In addition to the flooding of the tanks, two ‘diving planes’ also aid in controlling the speed of descent for the submarine. The angle of these ‘wings’ directly influences the speed of the dive.
Submarine diving underwater
Notice the orientation of diving planes as the submarine descends
On the other hand, when a submarine has to resurface, compressed air is blown into the ballast tanks from air flasks, which pushes the water out of the tanks at a rapid rate. This results in a decrease in the overall density of the submarine, causing it to rise to the surface. Furthermore, the hydroplanes are angled in such a way that water moves over the stern, pushing it down and making the submarine ascend faster.

Making turns underwater

Once you’ve acquired a cruising depth, you want to ensure that the submarine moves while staying submerged at the same depth without losing/gaining any further depth. To do this, the level of water and air present in the ballast tanks must be balanced. The tail rudder can be controlled to turn starboard/port (right/left), while the hydroplanes are used to control the fore-aft angle.
Submarine parts Rudder and Propeller
The tail rudder helps to maneuver turns underwater
Submarines are a formidable piece of engineering, in that they not only operate under incredibly high-pressure conditions hundreds of meters underwater, but also keep nations’ maritime borders protected from intruders and facilitate scientific research beneath the waves.