This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Exercise 6 Create Voronoi diagram from UCF_CC annotations | |
##### | |
##### 24/04/2018 | |
##### Nithikan Srinakrung - Bam | |
##### DFL, FTSM, UKM | |
import cv2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Exercise 5 Read an image from UCF Crowd dataset and draw lines between people. | |
##### Lines are between a person and 10 of the most far people from that person. | |
##### 18/04/2018 | |
##### Nithikan Srinakrung - Bam | |
##### DFL, FTSM, UKM | |
import cv2 | |
import scipy.io as sio | |
import numpy as np | |
from numpy.matlib import repmat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Exercise 4 Pick two points on an image, draw a thick red between these points | |
##### and show the image. | |
##### 17/04/2018 | |
##### Nithikan Srinakrung - Bam | |
##### DFL, FTSM, UKM | |
import cv2 | |
import random | |
import numpy as np | |
import matplotlib.pyplot as plt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Exercise 3 Take a one dimensional array of any site (length) and | |
##### create a two dimentional array out of it with the same elements. | |
##### 16/04/2018 | |
##### Nithikan Srinakrung - Bam | |
##### DFL, FTSM, UKM | |
import numpy as np | |
def dimension(array,number_of_rows): | |
result = np.zeros([number_of_rows,len(array)]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Exercise 2 Write a function that creates an array based on the function parameter. | |
##### Function will populate the array with consecutive numbers, then scale them. | |
##### 12/04/2018 | |
##### Nithikan Srinakrung - Bam | |
##### DFL, FTSM, UKM | |
import numpy as np | |
import time | |
def scale_number (a,b): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Exercise 1 Write function that tests an array for | |
##### its length not bigger than a certain value | |
##### 11/04/2018 | |
##### Nithikan Srinakrung - Bam | |
##### DFL, FTSM, UKM | |
def compare (a,lim): | |
if lim >= len(a): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## Assignment 2-3 Closest person to each person in each image | |
########## - Calculate the Euclidean Distance between every pair in every annotation | |
########## - Match everyone with their closet | |
########## 10/04/2018 | |
########## Nithikan Srinakrung - Bam | |
########## DF4, FTSM, UKM | |
import os,sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Assignment 2-2 Center point of the crowd in each image | |
##### -> Accumulate x and y positions and divide by person count | |
##### 04/04/2018 | |
##### Nithikan Srinakrung - Bam | |
##### DF4, FTSM, UKM | |
import os,sys | |
import scipy.io as sio | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Assignment 2-1 : | |
##### Total number of people in all images. | |
##### -> Accumulate the numbers that took from annotations. | |
##### 03/04/2018 TUE | |
##### Nithikan Srinakrung - Bam | |
##### DF4, FTSM, UKM | |
import os | |
import scipy.io as sio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################# | |
# Assignment 1 # | |
# Read every mat file in # | |
# a folder and plot the # | |
# annotation counts they # | |
# contain. # | |
# # | |
# Author : Nithikan (Bam) # | |
# Date : 02.04.2018 # | |
# # |