library(ggvis)
library(shapes)
##
## Attaching package: 'shapes'
## The following object is masked from 'package:stats':
##
## sigma
Load 3 shapes (standard, data1, cadidateData) from csv files
standard <- read.csv(file="D:/Standard.csv", header=TRUE, sep=" ")
data1 <- read.csv(file="D:/1.csv", header=TRUE, sep=" ")
cadidateData <- read.csv(file="D:/Sample.csv", header=TRUE, sep=",")
Try plotting candidate points: true landmarks are blue while the others are black
cadidateData%>%ggvis(~X, ~Y, fill = ~type)
## Guessing layer_points()
Make procrustes analysis so that data1 shape is aligned, rotated, scaled according to the standard shape
standard.m<-as.matrix(cbind(standard$X,standard$Y))
data1.m<-as.matrix(cbind(data1$X,data1$Y))
data1_p = procOPA(standard.m,data1.m)
Comparision between 2 shapes: standard and original data1. Note that data1 looks smaller
plotshapes(standard.m,data1.m,joinline=1:16)
Standard and manipulated data1. 2 shapes seem identical
plotshapes(standard.m,data1_p$Bhat,joinline=1:16)