| read.image {SAFARI} | R Documentation |
Read a Binary Image
Description
This function reads a reconstructed binary image, possibly, produced from an
X-Ray, CT scan, MRI, etc. and processed by standard image processing
algorithms. The image is then preprocessed to facilitate the procedure in
the binary.segmentation function.
Usage
read.image(file, invert = FALSE)
Arguments
file |
a character string that specifies the image to read. |
invert |
a logical value that indicates if the B/W colors should be inverted. |
Details
The binary image is preprocessed as follows:
Check if image contains multiple color channels, non-binary, or empty.
Invert black and white colors (optional).
Ensure image is truly binary by converting all values greater than zero to
1.Expand the border around the image with
0s.Rotating the image, if it is not stored as an
RDatafile.
Value
An integer matrix that represents the preprocessed image.
See Also
binary.segmentation for more information on reconstructed binary images.