.jpg images and convert them to list of coordinates.import.jpg(jpg.list)
import.multi1.jpg(path)
import.img.prepare(path)
import.img.Conte(img, x, auto=TRUE, plot=TRUE)vector of character containing the path to your .jpg images.character. A single path to a .jpg image.imagematrix object.vector of $(x; y)$ coordinates from where to start Conte algorithm.logical. Whether to try or not to start at the center of the image(s) before asking the user to click within the shape.logical. Whether to plot or not the image. Used internally by import.multi1.jpg to not reload the same image.import.jpg returns a list of (from 1 to thousands) $(x; y)$ coordinates arranged as matrices and that can be then converted to a Coo-object. import.multi1.jpg returns a list of $(x; y)$ coordinates. import.img.prepare returns an imagematrix object, import.img.Conte returns a matrix of $(x; y)$ coordinates.import.jpg. import.img.prepare and import.img.Conte are typically not used by front-user but internally by import.jpg. They clean, binarize, threshold, etc. raw .jpg images and extract a list of coordinates from a black and white imagematrix, respectively. The best option is to work with black and white .jpg image with the black mask of the outline overlapping the center of the image.
import.multi1.jpg helps to extract several outlines from the same .jpg image.Due to troubles with ReadImages and the recent change towards the jpeg package for import of images, they MUST be converted to black and white (i.e. 8-bits and grey levels ) images before being imported.
If you get this message error : "Error in img[1, ] : incorrect number of dimensions", try converting all your images to 8-bit mode, grey levels, and you can also apply a threshold (128 is fine) so that you only have black and white pixels, not grey. Then, save your images without compression. This can be done using automated scripts in editing softwares.
jpg.list <- list.files(path_to_your_folder_containing_.txt_files, full=TRUE)
I <- import.jpg(jpg.list)
Coo(I)Run the code above in your browser using DataLab