Skip to main content

Teaching Machines to Locate Objects in Photos

How to Create a holographic display and camcorder

In the last part of the series "How to Create a Holographic Display and Camcorder", I talked about how to use the cameras to calculate the disparity between photos.  To do so, we have locate the objects in two photos, but this should be done by a machine.

In this part of the series, I'll talk about how to show a machine to locate objects in photos.




To calculate the depth information or the disparity of an object, we need to locate where the object is in each photo.

[Insert an illustration of an object and a camera by X-axis translation]


How to locate an object in each photo?
In each photo, we need to find the same object.  Then, we should calculate the disparity between the object in the first photo and the object in the second photo.

So, how do we locate the same object in each photo?

Let's say we want to locate a tip of a cat's left ear in two photos.  Each photo shows the same cat, but at the different location.

Can we teach a machine to recognize a cat in a photo, in general, by using the machine learning, but they do find them with about 70% confidence rate, and it takes time to process each image.

For the machine learning, I'll write a blog in another time.

We need a fast locating algorithm to find us the tip of the cat's ear, almost every time.


Using a gradient value between a pixel and its neighboring pixels? 

Going back to the basics of image pixels, we can say, whenever there is a steep difference between the intensity value of the current pixel and the intensity values of the neighboring pixels.

This is called taking a gradient value between pixels.

This should give us nice locating points in an image?

There are multiple issues with this problem.  In this sample, we are using the photos showing the one-axis translation.

But in reality, the object is a photo A may be at a different location entirely in a photo B.  The object may look bigger, rotated or at a different angle.

So, if we taking the gradient values, they would give the same reliable locations, if the object in a photo B is now rotated.


Using a pixel corner as a locating point in an image

To work with the rotation issue, we can use a L-shaped gradient.   In any rotation, it is still a L.  This is called an interest point.






How to find the same locating points in other photos?

Okay, so we locate multiple locating points in a photo A.  How do we find the same interest points in a photo B?

Let's say we have an interest point X in a photo A.

And we want to find the same interest point X' in a photo B.

How do we know if they are indeed identical?

One of the ways is to take the neighboring pixel values of an interest point X and compare the neighboring pixel values of the interest point X'.

These neighboring pixel values of an interest point X is called a descriptor.  

A locating point is called an interest point.

An interest point and the descriptor is called a feature.


  • Interest Point
    • A locating point is called an interest point.
  • Descriptor
    • The neighboring pixel values is a descriptor, for example.
  • Feature
    • A descriptor and an interest point is called a feature.

They are actually multiple ways to define a descriptor.  For this project of creating a Holographic Display and a Holographic Camcorder, we have other options.



Shift Invariant Feature Transform (SIFT)
There are multiple locating feature algorithms to consider. 

SIFT
FAST
HOG
SURF
GOLH
[Briefly explain each of these]

[Todo:  Provide Machine Learning and Deep Learning algorithms in comparison in the future]


[Insert a intersection set of a set A and a set B is common among sets A and B]


How to extract the depth of an interest point in a photo?

To extract the depth of an interest point in a photo A in comparison with a photo B, we will use a method called Triangulation.

In the next part of the series, I'll talk about Triangulation.

Comments

Popular posts from this blog

How to project a camera plane A to a camera plane B

How to Create a holographic display and camcorder In the last part of the series "How to Create a Holographic Display and Camcorder", I talked about what the interest points, descriptors, and features to find the same object in two photos. In this part of the series, I'll talk about how to extract the depth of the object in two photos by calculating the disparity between the photos. In order to that, we need to construct a triangle mesh between correspondences. To construct a mesh, we will use Delaunnay triagulation.  Delaunnay Triagulation - It minimizes angles of all triangles, while the sigma of triangles is maximized. The reason for the triangulation is to do a piece wise affine transformation for each triangle mapped from a projective plane A to a projective plane B. A projective plane A is of a camera projective view at time t, while a projective plane B is of a camera projective view at time t+1. (or, at t-1.  It really doesn't matter)

How to create a holographic camcorder

Since the invention of a camcorder, we haven't seen much of advancement of a video camcorder. Sure, there are few interesting, new features like capturing video in 360 or taking high resolution 4K content. But the content is still in 2D and we still watch it on a 2D display. Have you seen the movie Minority Report (2002)? There is a scene where Tom Cruise is watching a video recording of his lost son in 3D or holographically. Here is a video clip of this scene. I have been waiting for the technological advancement to do this, but it's not here yet. So I decided to build one myself. In order to build a holographic video camcorder, we need two devices. 1) a video recorder - a recorder which captures the video content in 3D or holographically. 2) a video display - a display device which shows the recorded holographic content in 3D or holographically. Do we have a technology to record a video, holographically. Yes, we can now do it, and I'll e

Creating an optical computer

Creating an optical computer  Note on creating an optical computer.  What is Optical Computer? A laptop is a microchip based computer and uses electricity and transisters to compute. An optical computer uses photons to compute.  How does it compare to a typical laptop? A modern desktop computer has about 5 TFLOPS (5 x 10^16 floating calculations per second). With an optical computer, there is no limit in the calcuations per second.   Is an optical computer faster than a quantuam computer?  In 2016, the fastest known quantum computer has 2000 qubits, which is 1000 faster than 512 qubits.  With an optical computer, there is no artificial limitation like 2000 or 500 qubits.   What's the theoretical compute limit on an optical computer?  There is a limit of speed of light. For now, the only artificial limitation is how we design the first prototype.  How much electricity energy does it require?  The first POC should use less than 1000 W/hr.  Has there been any prior inventions or work