View source: R/write_sky_points.R
write_sky_points | R Documentation |
Create a special file to interface with the HSP software.
write_sky_points(sky_points, path_to_HSP_project, img_name)
sky_points |
An object of the class data.frame. The result of a
calling to |
path_to_HSP_project |
Character vector of length one. Path to the HSP project folder. For instance, "C:/Users/johndoe/Documents/HSP/Projects/my_prj/". |
img_name |
Character vector of length one. For instance, "DSCN6342.pgm" or "DSCN6342". See details. |
This function is part of a workflow that connects this package with the HSP software package \insertCiteLang2013rcaiman.
This function was designed to be called after
extract_sky_points()
. The r
argument provided to
extract_sky_points()
should be an image pre-processed by the HSP
software. Those images are stored as PGM files in the subfolder "manipulate"
of the project folder (which will be in turn a subfolder of the
"projects" folder). Those PGM files can be read with
read_caim()
.
The img_name
argument of write_sky_points()
should be the name
of the file associated to the aforementioned r
argument.
The following code exemplifies how this package can be used in conjunction with the HSP software. The code assumes that the user is working within an RStudio project located in the HSP project folder.
r <- read_caim("manipulate/IMG_1014.pgm") plot(r) z <- zenith_image(ncol(r), lens()) a <- azimuth_image(z) g <- sky_grid_segmentation(z, a, 10) mblt <- ootb_mblt(r, z, a)$bin bin <- mask_hs(z, 0, 85) & bin sun_coord <- extract_sun_coord(r, z, a, bin, g) write_sun_coord(sun_coord$row_col, ".", "IMG_1014") sky_points <- extract_sky_points(r, bin, g) write_sky_points(sky_points, ".", "IMG_1014")
None. A file will be written in the HSP project folder.
Other HSP Functions:
read_manual_input()
,
read_opt_sky_coef()
,
row_col_from_zenith_azimuth()
,
write_sun_coord()
,
zenith_azimuth_from_row_col()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.