This is the main routine used in the extraction of data from the Zooniverse data frame (converted JSON or nested list). The input consist of all classifications for a particular subset, the bounding box associated with these classications (based upon the original image) and the size of the image along the y-axis for referencing and scaling of the data.

line_sections(subset, bb, img_y)

Arguments

subset

subset of annotations

bb

bounding box coordinates from bounding_box()

img_y

image height

Value

returns a matrix of line section locations (empty 0 if nothing returned)

Details

NOTE: This might be a bit less unwieldy in tidyverse syntax but it isn't worth the effort to rewrite it. Plenty of exceptions might also get in the way of holding true.