background

Niko's Project Corner

Matlab at other sites


Simulating gravitational field near a torus

(19th April 2016)

There are many games with a strong em­pha­sis on grav­ity, and at times even multi-body tra­jec­tory sim­ula­tions. How­ever they all seem to be based on spher­ical ge­om­etry (as plan­ets are shaped by grav­ity), but other shapes should cre­ate in­ter­est­ing tra­jec­to­ries. As torus has ro­ta­tional sym­me­try its grav­ity field can be mod­elled on a 2D cross-sec­tion. In this pro­ject torus' field is es­ti­mated in 3D, pro­jected to 2D and in­ter­po­la­tion func­tions are fit­ted. The space- and time-ef­fi­cient model could be used in a game to do physics sim­ula­tion in real time.

Languages: Matlab
Tags: Applied mathematics

Approximating planets' orbits in closed-form

(12th October 2014)

I wanted to find or cre­ate a for­mula which would ac­cept an epoch times­tamp, lat­itude and lon­gi­tude and it would pro­duce the Sun's ob­served az­imuth and al­ti­tude in ra­di­ans. It needs to take into ac­count de­tails earth's ax­ial tilt and its po­si­tion on its or­bit around the sun. To my sur­prise I wasn't able to find such for­mula, so I had to de­velop it from scratch. Luck­ily earth's or­bit (and or­bits in gen­eral) is a well stud­ied and doc­umented prob­lem, so I could take some short­cuts.

Languages: Matlab
Tags: Astronomy Applied mathematics

Automatic map stitching

(10th September 2014)

Nowa­days there are many HTML5-based map ser­vices, but typ­ically they don't of­fer any ex­port func­tion­al­ity. To cre­ate a full view of the de­sired re­gion, one can ei­ther zoom out (and lose map de­tails) or take many screen­shots of dif­fer­ent lo­ca­tions and man­ually stitch them to­gether. This pro­ject can au­to­mat­ically load all stored screen­shots, de­tect the map, crop rel­evant re­gions, de­ter­mine im­ages rel­ative off­sets and gen­er­ate the high-res out­put with zero con­fig­ura­tion from any map ser­vice.

Languages: Matlab
Tags: Computer Vision Rendering FFT

Image distortion estimation and compensation

(9th August 2014)

This pro­ject's goal was to au­to­mat­ically and ro­bustly es­ti­mate and com­pen­sate dis­tor­tion from any re­ceipt pho­tos. The user is able to just snap the photo and OCR could ac­cu­rately iden­tify bought prod­ucts and their prices. How­ever this task is some­what chal­leng­ing be­cause typ­ically re­ceipts tend to get crum­bled and bent. Thus they won't lie nicely flat on a sur­face for easy anal­ysis. This set of al­go­rithms solves that prob­lem and pro­duces dis­tor­tion-free thresh­olded im­ages for the next OCR step.

Languages: Matlab
Tags: Computer Vision

Real-time car tracking and counting

(7th June 2014)

From my of­fice win­dow I've got an un­blocked size-view to the Ring Road I (Kehä I) in Es­poo, Fin­land. It is one of the bus­iest roads in Fin­land, hav­ing up-to 100.000 cars / day. I wanted to cre­ate a pro­gram which would re­ceive a video feed from a we­bcam and would pro­cess im­ages in real time on com­mon hard­ware.

Languages: Matlab
Tags: Computer Vision FFT

Visualizing laser scanned geography

(7th July 2013)

Dur­ing the sum­mer of 2012 when I was mainly work­ing on my Mas­ter's The­sis, I also had a look at Na­tional Land Sur­vey of Fin­land's open data down­load ser­vice. There I down­loaded a point cloud dataset which had typ­ically 4 - 5 mea­sured points / square me­ter. This means that to vi­su­al­ize a re­gion of 2.5 × 2 km, I had to work with a point cloud con­sist­ing of 5 × 2500 × 2000 → 25 mil­lion points. I chose to con­cen­trate on my cam­pus area, be­cause I know it well and it has many in­ter­est­ing land­marks. For ex­am­ple the iconic main build­ing can be seen in Fig­ure 1.

Languages: Matlab C++
Tags: Rendering Data Structures

Rendering omnidirectional images

(7th July 2013)

As I men­tioned in the pre­vi­ous ar­ti­cle about om­ni­di­rec­tional cam­eras, my Mas­ters of Sci­ence The­sis in­volved the us­age of this spe­cial kind of imag­ing sys­tem which con­sists of a tra­di­tional cam­era lens and a con­cave mir­ror, which pro­vided 360° × 90° Field of View. It was or­dered from Japan and there was some de­lay in the de­liv­ery, so mean­while I wrote an all-Mat­lab script to sim­ulate this sys­tem's prop­er­ties, cal­ibra­tion and panorama gen­er­ation in prac­tice.

Languages: Matlab
Tags: Rendering

Omnidirectional cameras

(6th July 2013)

My Mas­ters of Sci­ence The­sis in­volved the us­age of a so-called "om­ni­di­rec­tional cam­era". There are vari­ous ways of achiev­ing 180° or even 360° view, with their dis­tinct pros and cons. The gen­eral ben­efit of these al­ter­na­tive cam­era sys­tems is that ob­jects don't need to be tracked, be­cause gen­er­ally they stay with­ing the ex­tremely broad Field of View (FoV) of the cam­era. This is also very ben­efi­cial in vi­sual odom­etry tasks, be­cause land­marks can be tracked for longer pe­ri­ods of time.

Languages: Matlab C++
Tags: Computer Vision

Coin recognition algorithm

(26th June 2013)

I de­vel­oped a coin recog­ni­tion sys­tem which can rec­og­nize eight dif­fer­ent groups of coins. The used set is all five coins of Sin­ga­pore, but a few cat­egories can­not be dis­tin­guished from each other with­out knowl­edge of the coin's size in re­la­tion to oth­ers.

Languages: Matlab
Tags: Computer Vision Machine Learning FFT

Fingerprint matching algorithm

(25th June 2013)

For my Bach­elor of Sci­ence de­gree I de­vel­oped a novel fin­ger­print match­ing al­go­rithm, which ended up beat­ing many al­ter­na­tive meth­ods which were de­vel­oped by re­search groups around the world. The used dataset the same which was used for FVC 2000 (Fin­ger­print Ver­ifi­ca­tion Com­pe­ti­tion).

Languages: Matlab C++ SDL
Tags: Computer Vision Data Structures