knitr::opts_chunk$set(echo = TRUE)
Set the working directory to ./r2vr
Open and source new_2D_coral_cover.R
Setup scene:
Enter the full name of the user separated by a hyphen
user <- "Jon-Peppinck"
Save the 2D images into ./2dimages/latest
By default the software assumes a consistent 4:3 aspect ratio for images, Ensure images are of these dimensions to avoid scaling issues e.g. 4000x3000 (4000px wide, 3000px tall)
Provide up to 20 coordinates for each image in a list of lists data structure
img1Points = list( list(x = 3203, y = 173), list(x = 1726, y = 356), list(x = 2291, y = 1086) ) img2Points = list( list(x = 1000, y = 1000), list(x = 2000, y = 2000) )
img1PointsIsCoral = list( list(id = 1, isCoral = 0), list(id = 2, isCoral = 0), list(id = 3, isCoral = 0) ) img2PointsIsCoral = list( list(id = 1, isCoral = 0), list(id = 2, isCoral = 0) )
img_paths <- list( list(img = "./2dimages/latest/49001074001.jpeg", imgPoints = img1Points, imgPointIsCoral = img1PointsIsCoral), list(img = "./2dimages/latest/49002256001.jpeg", imgPoints = img2Points, imgPointIsCoral = img2PointsIsCoral) )
start()
In this experiment, there are 6 2D images in total. To avoid order bias, 3 out of the 6 images have been selected at random.
img_paths <- sample(img_paths, 3, replace=FALSE)
The imageXPoints variable is assigned to always correspond to the random image selected - Where X = 1, 2, 3. E.g. image1Points refers to the image points set at the beggining of Step 3 for whatever the first random image happens to be.
fixedPointsTemp(image1Points)
This will render the markers for the user to annotate.
The user can use the VR headset to align the camera focus point with a marker. They can then click a button on the headset to get a pop-up menu where they can select either 'C' for Coral or 'N' for not Coral by hovering over that option
Call the next image to annotate then repeat Step 5 & 6 until all 3 images are annotated
goImage(2)
fixedPointsTemp(image2Points)
goImage(3)
fixedPointsTemp(image1Points)
check(1)
check(2)
check(3)
question(1)
question(2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.