Aligning Images with a UI

Standard

I added to my Python program where a user can click on 4 points and the coordinates of those points will be returned. Now the user selects the 4 corners of a rectangle in order and given the corresponding coordinates of those corners in a straightened image, the program straightens a warped image. If the user presses ‘c’ after the corners are selected the program will straighten the image. If the user presses ‘r’ the previous selections will be cleared and the user can select 4 new corners.

Here is a link to a folder with the program and images in it. You have to download the entire folder and run the Python program from within it.

An image of the output after the program is run:Screen Shot 2017-07-03 at 5.53.39 PM.png

Coordinates of corners of a rectangle

Standard

I created a program using Python and OpenCV where a user can click on 4 points in an image and the program will return the coordinates of those 4 points. If the user presses ‘c’ after the points are selected the program will print the coordinates of the points. If the user presses ‘r’ the previous selections will be cleared and the user can select 4 new points.

Here is a link to a folder with the program and images in it. You have to download the entire folder and run the Python program from within it.

An image of the output:

Screen Shot 2017-07-03 at 4.22.46 PM.png

Warped Coordinate System

Standard

I was trying to find a coordinate system to find the correspondence between the coordinates of points in an original image of a rectangle and the coordinates of points in a warped image of a rectangle. I believe I found a coordinate system based on the boundaries of the warped rectangle but I still have to check if it is accurate. Here is an image of the coordinate system I found:

IMG_0860.JPG

Aligning Images

Standard

I recently wrote a program to align images using OpenCV in Python. I drew a rectangle with ten dots on it and took pictures of it at different angles. I used the locations where each of the corresponding dots moved to find a homography between the straight picture and each angled picture. I then warped the angled pictures using this homography to align them.

Here is a link to download the folder with the images and Python code in it as well as an image of the output. Make sure to download the whole folder and run the python code from within that folder.

perspective1output.png

 

 

 

 

 

Chess

Standard

I just finished creating a two player Chess game using Processing and Java where human players take turns at the computer.

To play Chess download the Chess folder from this link

Then download Processing for your operating system from this link

Open the Chess.pde file in the Chess folder you downloaded with Processing

2048 Game

Standard

I recently created a version of the popular online game 2048 using Processing and Java. The objective of the game is to combine two tiles with the same number until you get to the 2048 tile. When two tiles of the same number combine into one tile, the new tile’s number is the sum of both the original tile’s numbers. Pressing the arrow keys on your keyboard combines all the tiles in that direction. Every time an arrow key is pressed a new tile randomly spawns somewhere on the grid. The game ends when there are no tiles that can be combined and the board is full.

Here is a link to download Mac OSX and Windows versions of the game

Route Finder App Part 2

Standard

I finished my Route Finder Android app. It now finds the best driving route through a set of cities using Google Directions API data (I used this instead of the Google Distance Matrix API because it was easier to work with) and Google Maps API as well as an algorithm I wrote. The first city that is entered when the app starts is the city that the route starts and ends at. When a city is entered a marker is added to the map and the optimal route is recalculated to include that city.

The app still lags at times (the button sometimes has to be pressed multiple times to add a city to the map and find the optimal route). So there is still room for improvement, but at least it is in somewhat usable shape.

Here is a video demonstrating the app:

To run the app make sure you have an android device, go to the following link on the device and download the APK file. You will be prompted to install it.

Link to APK file