Matlab: K-means Clustering (manually)


From my favorite matlab blog of AngelJohnsy (click to view the rest of the article).

 

Clustering can be defined as the grouping of data points based on some commonality or similarity between the points. One of the simplest methods is K-means clustering. In this method, the number of clusters is initialized and the center of each of the cluster is randomly chosen. The Euclidean distance between each data point and all the center of the clusters is computed and based on the minimum distance each data point is assigned to certain cluster. The new center for the cluster is defined and the Euclidean distance is calculated. This procedure iterates till convergence is reached…

Advertisements

Matlab installation on Raspberry PI and video capture


From the STEM Academy of Elements 14 community (click here).

3D Augmented Reality using OpenCV and Python


Electric Soup

It is time. For. 3D Augmented Reality.

In a previous post, Augmented Reality using OpenCV and Python, I was able to augment my live webcam stream with a cube:

augmentedreality_policeman

In my last two posts, Glyph recognition using OpenCV and Python and Glyph recognition using OpenCV and Python (Mark II), I was able to draw devils on glyphs:

Top notch!

So why not bring this all together, and stick a cube on top of each devil:

Perfect. So. What. Next >>>

Well, now that we know how to project a 3D space around our glyphs, let’s render something more pretty than a grey cube. Stay tuned.

P.S.

Here’s all the code, which the previous posts explain:

The main program

glyphfunctions.py

glyphdatabase.py

effects.py

webcam.py

View original post