I using pixmap library to convert imaging data from Image 32x32 Pixel to matrix table
library(pixmap)
system ("convert test.jpg test.ppm")
m <- read.pnm("test.ppm")
str(m)
Showing properties like below:
##Formal class 'pixmapRGB' [package "pixmap"] with 8 slots
##..@ red : num [1:32, 1:32] 1 1 1 1 1 1 1 1 1 1 ...
##..@ green : num [1:32, 1:32] 1 1 1 1 1 1 1 1 1 1 ...
##..@ blue : num [1:32, 1:32] 1 1 1 1 1 1 1 1 1 1 ...
##..@ channels: chr [1:3] "red" "green" "blue"
##..@ size : int [1:2] 32 32
##..@ cellres : num [1:2] 1 1
##..@ bbox : num [1:4] 0 0 32 32
#3..@ bbcent : logi FALSE
convert to matrix
RedImage2Matrix <- matrix(m@red,32,32)
if I want show data from matrix, output data will showing with long floating point like this 1.0000000, make crowded data table. If I want show data with 1x10^-7 or just show 1.0, It's possible? please help. Thanks in Advance