Getting timestamp on livestream video on OpenCV quick and dirty.

September 14 | 16

So I have been working on testing some SLAM methods in specific ORB-SLAM2 and in order to make it run on a webcam one needs to pass among the frame in open CV a timestamp for the frame. In theory it should be dead easy, just call on the CV::VideoCapture class the Get method with the “CV_CAP_PROP_POS_MSEC” property according to the OpenCV documentation. But turns out this is half implemented so for live streams it just doesnt work. According to this it turns out there is a way to patch the OpenCV Library and implement this, but I was just needing to get a timestamp really quick in order to feed to my SLAM method. So what I did was this:

I took this piece of code from the same ORB-SLAM2 repo and accommodated to count the time to query a frame from the webcam. Its a quick and dirty trick but does its job 🙂

Procedural city visualization and moveable agents coverage.

April 18 | 16

AgentCoverageNiceViz

For the information visualization class I had an old project that I wanted to revive; it was called the “ambulances” program; it was a project where we had to come up with an algorithm to visualize ambulance coverage in a city for Data Structures and Algorithms class back in my college years.

The whole idea of the class project was to visualize information and the whole idea of the ambulances project was that given a set of N ambulances, where to place them in a city graph in order to minimize the response time for each moveable agent (ambulance).

Unfortunately the data that I had didnt had spatial coordinates so I had to generate the data by my own. I used a modified version of CityGen to dump the generated data for the generated cities, and then I created an app in Unreal Engine to be able to visualize the generated data and my algorithm.

The idea of this project besides visualizing information was also to go and push myself to learn some Unreal Engine and rust off my C++ skills :-).

At the end the project was finished and I could visualize that the algorithm that we created worked more or less good for circular cities but for elongated cities didn’t work as good.

If you are interested in how this project works, feel free to fork it from here. Also if you are interested on what specifically I tried and what experiments I did, feel free to read the report I made (full of images), else just see some of the images next.

AgentCoverageGreenToRed

Coverage per agent on a response-time visualization, for this agent organization and supposing you live in this city, you might want to avoid the places with red nodes in case you get sick often as ambulances will take the most time to reach those places hehe ;)

CityBaseViz

Basic procedural city load into Unreal.

ElongatedCityProblems

Algorithm failing on elongated cities; notice how 2 agents are close to each other (not ideal).

MainPage

17 agents with their respective clusters being covered.

NodeCoverage3Agents

3 Agents being visualized with their respective clusters, you can see that the brown cluster is bigger, this is not a good sign the algorithm is working as expected.
SpeedVisualizationFinally some segment speed visualization; the greener the faster the yellower the slower speeds are in each segment.

 

Where’s my daughter?! Our Entry for the Global Game Jam 2016

February 3 | 16

For those of you who dont know, the global game jam (http://globalgamejam.org/) is a hackaton where the purpose is to develop a game given a topic.

This year, my Colombian friends from Indie Level and I came up with an idea of a puzzle where the main goal is to sneak into a castle and get to the princess room, hypnotize her and take her back to the starting point. We where inspired in Monument Valley to create this game.

Without further ado, here’s a video on how the game ended up looking after 48 hours. this was made by 2 artists and 2 programmers.

We plan to release the game for Mobile devices with 10 levels initially but no release date yet. if you like it, let me know 🙂

 

 

Introducing Potel: A pottery maker simulator for VR.

January 11 | 16

Potel is a small VR application that focuses on exploring the art of pottery creation through virtual reality. Inside Potel, users are able to create virtual pots with the aid of a spinning wheel that lets them shape virtual “clay” the same way you would do if you where making pottery in real life.

Screenshot3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The way the players interact with the world is with their hands by modeling pottery to their will either by pushing or pulling an initial blob of clay.

We use a Leap motion for tracking the user’s hands movements in the world. An Oculus Rift to immerse themselves in the generated scene and an optional in house hand vibrators that let players know when they are interacting with the world.

Screenshot1

 

 

 

 

 

 

 

 

 

 

 

 

 

Finally after the desired shape has been created the user can 3D print the created art.

UP3Ck6If you happen to have an Oculus rift and a leap motion, feel free to download it from here.

We have noticed a big portion of the users that tried the system without haptic feedback (but knowing about the depth cues) try to place their hands just over the surface of the clay on the first experiences.

Some other users after the first attempts when they are pretty immersed in the environment try to reach a bucket of water that is next to the chair as a prop thinking that everything in the world is inter-actable.

The system currently supports clay deformation for each finger but we decided to stick to the palms because sometimes the leap tracker gets lost and the clay model gets affected because of tracking issues.

 

Here’s a small video of the app working:

And in case you are interested in a more in depth explanation on how the system works, you can read a paper we wrote in here.

If you like it, let me know :).

Forcing OpenGL on Unity5.x on windows Builds

November 3 | 15

So in the lab we needed to run our builds in windows in OpenGL so based on the docs you just add a “-force-opengl” flag when starting the app and you should be good to go.

But we where getting a pink screen all over the place (symptoms of unrecognized shaders). After fighting with it for a while I asked Aras and turns out that since Unity 5.1 OpenGL shaders are not included into windows builds by default.

So to make this work, just go to Editor->Project Settings -> Player and uncheck “Automatic graphics API” and add GL in the player settings and you should be good to go.

ii_150cf6245fc0db4f