Deep Convolutional Neural Networks have largely dominated many Computer Vision(CV) tasks in the past decade. We will focus on a more ‘old-school’ aspect of Computer Vision: 3D Vision. I am sure 3D vision is something we encounter in our everyday lives — I mean, our eyes basically function using this principle. This post aims to introduce some of the basic concepts behind it!
Find the focal length (in pixels) of your smartphone
In the world of Computer Vision(CV), there are many interesting concepts. Deep Convolutional Neural Networks have largely dominated many CV tasks in the past decade. CNNs are able to perform better than humans at things like image classification, object detection and image segmentation in certain domains. The best advantage of CNNs are that they can run at scale, hence putting much of the image data collected by individuals and corporations to good use! Recently, Transformers are also being explored for CV tasks. However, in this post, we will focus on a more ‘old-school’ aspect of Computer Vision: 3D Vision. I am sure 3D vision is something we encounter in our everyday lives — I mean, our eyes basically function using this principle. This post aims to introduce some of the basic concepts behind it!
One of the key functions of 3D vision is to capture depth information. With a single camera, we only have 2D information about a particular scene, therefore 2 cameras are needed at minimum! (E.g. our eyes!). In this series, I will demonstrate how to do 3 simple tasks that can be done with your smartphone camera:
The focal length of a camera is illustrated in the figure below. This is a simplified of the inner workings of cameras and lenses. We can easily see that the focal length can be found by measuring the real height, real distance and image height of an object. These quantities are related by the formula:
If you remember your high school physics lessons, this probably looks familiar. Now, we will go further than theory, and try to find out the focal length of our smartphones! You can follow the steps and try it out yourself.
Find an object with a known height, H. Use your friends/family or you can just use 2 points on a wall and measure the distance.
Take a photo from a certain distance, *D *away from the object.
Photo of my bedroom with 2 beautifully drawn crosses on the wall.
3. Measure the image height, *h *of the object. You can use any common image editing tool or image viewer, I did it in Microsoft Paint. By hovering over the crosses with a brush tool, we can get the image coordinates shown in the bottom left of the image below.
4. Calculate the image height from the two points using Pythagoras’ theorem. For my photo, the points were (1849,291), (1782,2954), and the calculated height was 2664 pixels.
5. Calculate f using the equation from above! Make sure that the units of H and D are the same (I used meters like most of the world).
6. I got a focal length of 3566 pixels, using a OnePlus 6T smartphone. Do share your results and phone model by commenting below!
The agenda of the talk included an introduction to 3D data, its applications and case studies, 3D data alignment and more.
A few compelling reasons for you to starting learning Computer. In today’s world, Computer Vision technologies are everywhere.
How you can use Deep Learning even for small datasets. When you’re working on Deep Learning algorithms you almost always require a large volume of data to train your model on.
5 simple steps to auto rotate the image to get the right angle in the human photos using computer vision. The above image showed the input (left) and output (right).
Data Science and Analytics market evolves to adapt to the constantly changing economic and business environments. Our latest survey report suggests that as the overall Data Science and Analytics market evolves to adapt to the constantly changing economic and business environments, data scientists and AI practitioners should be aware of the skills and tools that the broader community is working on. A good grip in these skills will further help data science enthusiasts to get the best jobs that various industries in their data science functions are offering.