Skip to content

Instantly share code, notes, and snippets.

View kingslyt's full-sized avatar

Kingsly Theodar Rajasekar kingslyt

View GitHub Profile
@kingslyt
kingslyt / cka-bookmarks.html
Created July 17, 2020 09:44
cka-bookmarks
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1579618265" LAST_MODIFIED="1582022136" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Bar</H3>
<DL><p>
@kingslyt
kingslyt / guessCorrelationCoefficientFromImage.R
Created June 9, 2016 00:02
Run this for loading image from guessthecorrelation.com and printing the correlation coefficient
gtcImgRGB <- readPNG("GuessCorrelation/test-1.png")
#dim(gtcImgRGB)
gtcImgGray <- RGB2GRAY(gtcImgRGB)
gtcImgGray1stQuadHorizFlipped <- apply(gtcImgGray, 1, rev)
gtcBinaryImg <- gtcImgGray1stQuadHorizFlipped <= 0.99999
#pimage(gtcBinaryImg)
gtcThinnedImg <- thinImage(gtcBinaryImg)
#pimage(gtcThinnedImg)
getCorrCoeff(gtcThinnedImg, 1)
@kingslyt
kingslyt / getCorrCoeff.R
Created June 9, 2016 00:00
Functions related to getting correlation coefficient from an image
setwd("c:/workspace/R/")
library(png)
library(seriation)
absDiff <- function(matrix1,matrix2)
{
r <- nrow(matrix1)
c <- ncol(matrix1)
destMatrix <- matrix1
for(r in 0:r-1)