Tuesday, November 29, 2016

Exer12: Augmented Reality

Augmented Reality is live view of the real world whose elements are supplemented/augmented by a computer. This concept is found in many games, one of which is PokemonGO.

In our exercise, we were tasked to augment an image to the chess board pattern and when the pattern is rotated, the image supplemented actually rotates alongside the pattern.


Exer11: Chroma Keying

In this exercise, we worked in groups to create a video mainly made by using chroma keying. Chroma keying is a way to detect a certain color in an image and replacing the detected color with another image/image sequence. This is commonly used in fantasy and sci-fi movies.

In our chroma keying video, we were assigned to copy and make our version of K-On's opening theme.


For the exercise, we used a dark green background.





Exer10: Color Tracking

In this exercise we were tasked to track an object using its color. To do so, we put a small, black rectangle in every frame of the image sequence (although not seen in the image lol). The object to be tracked will be put in the frame in a way that the black rectangle covers the object.

Small, black rectangle is somewhere in there lol

When a colored object (non-black) is put in the region of the rectangle, the rectangle will change to the color of the image. The colored object will then be tracked when moved in the image sequence.


Although we were able to successfully detect the color of the object and change the color of the rectangle, we had trouble tracking the image :(


Exer9: Background Subtraction

In this exercise, we were tasked to get the foreground pixels (image) in a video or sequence of images.

First, it was important that we get the background model of the image sequence. To get the background model, we took a number of frames in the image sequence, converted it to grayscale, and computed the median of the grayscale pixels.

Background Model

Next, this background model was subtracted to every frame in the image sequence. The difference per pixel is then compared to the given threshold. If the difference is greater than the threshold, it is assigned as a foreground pixel. Else, it is a background pixel.




Monday, November 7, 2016

Exer8: Pseudo Coloring (False Coloring)

In this exercise, we were tasked to get the intensity of the temperature of the sea/ocean parts of the image using pseudo coloring.

Albert


Bret



Floyd 




Exer7.5: Optical Character Recognition part 2

In this exercise, we were tasked to detect what characters are present in the given set of plate number images using tesseract.

Before using tesseract, the images used had to be preprocessed first to ensure that the tesseract only reads/detects the plate number and not the rest of the image.


Image 1

Region of Interest
Image 1 Results:


Image 2

Region of Interest
Image 2 Results:


Image 3

Region of Interest
Image 3 Results:


This is done to all the given images. It can be seen that the results are not always right. The results that tesseract gives highly depends on how the region of interest is preprocessed.

Monday, October 10, 2016

Exer7: Optical Character Recognition Part 1


In this exercise we were tasked to detect what number is present on the input image.

To do so we used a set of training images as basis. For each number, we made five samples thus resulting in 50 control images.

We used Euclidean Distance Formula:


This formula is used on the training data images and on the input image. The lower the result, the closest it is to the input image.




Training Data
Sample Input Images Used
Correct output!
Incorrect output :(

Although we were able to detect the connected components, some of the numbers resulted to the wrong output. Perhaps the features that we used aren't enough.

Exer6: Erosion-Dilation

For this exercise we were tasked to detect the shaded and count the shaded circles in the evaluation forms.

There were the following problems/concerns in the exercise:
  • 'x' marks exist in some forms where the answers were changed. 'x' marks should not be detected as a circle
  • some circles are lightly shaded
In order to get the desired output, we used a lot of preprocessing techniques (blurring, erosion, dilation, binarization, etc.) to enhance the image before detecting the circles.

Successfully detected image!

Unable to distinguish 'x' marks from circles

As seen on the second image, we were not able to distinguish the 'x' marks.

Monday, September 19, 2016

Exer5: BLOBS

There were two parts:

PART1: Coins

The activity is to box the coins depending on the value. After boxing the coins, the total value will be computed.

  • 5 centavos - RED
  • 10 centavos - BLUE
  • 25 centavos - PINK
  • 1 peso - YELLOW
  • 5 pesos - GREEN

original image (coins1.jpg)


image after binarization


OUTPUT YAY


PART2: Objects

Objects seen in the given image are to be boxed, identified and labeled.


original image(objects.jpg)


image after binarization


OUTPUT YAY. lols Nokia3310 ftw








Exer4: Canny Edge Detection and Adaptive Thresholding

We had two tasks for this exer:

First was to highlight the text of the following images and turn the background to white. First we had to get the threshold of all the images and binarize them afterwards. (Simple)


japbend.jpg



japflat.jpg


magazin1.jpg



magazin2.jpg


Second activity was to get the edges of a certain image after binarizing it. Canny Edge detection was used.

original image (source.jpg)

after adaptive thresholding and canny edge detection











Monday, August 29, 2016

Exercise 3: Image Filtering

Original Image



Mean Filtering

Kernel 1:
1  1  1
1  1  1
1  1  1


Kernel 2:
-1  -1  -1
-1   8  -1
-1  -1  -1


Kernel 3:
1  2  1
2  4  2
1  2  1


Kernel 4:
1  0  0
0  1  0
0  0  1


Kernel 5:
0  -1   0
-1   5  -1
0  -1   0



Comparison:
  • Out of all kernels, kernel 1 produced the smoothest and clearest image. It's color is also closest to the original image.
  • Kernel 2 produced the image with most noise. Also it's color changed the most as compared to the other kernels. 
  • Kernel 3 produced a somewhat smooth image but the color of the original image changed.
  • 4th and 5th kernel resulted in smooth but very dark images. Kernel 5 gave the darkest image out of all.

Median Filtering

Kernel 1:
1  1  1
1  1  1
1  1  1


Kernel 2:
-1  -1  -1
-1   8  -1
-1  -1  -1


Kernel 3:
1  2  1
2  4  2
1  2  1


Kernel 4:
1  0  0
0  1  0
0  0  1


Kernel 5:
0  -1   0
-1   5  -1
0  -1   0


Comparison:
  • All images, except kernel 4 and 5, gave good results which is a smooth image.
  • Kernel 1 is the most similar to the original image.
  • Kernel 2's colors are the most different as compared to the other kernels (image negative)
  • Kernel 1 and 2 gave the smoothest results.
  • There are still a few grains and noise in kernel 3.
  • The original image is no longer visible in kernel 4 and 5. It only resulted in a black image.