Skip to content

kumeS/GoogleImage2Array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRAN CRAN_latest_release_date CRAN CRAN downloads last month CRAN downloads last week

R package for Creating Array Data from 2D Image Thumbnails via Google Image Search

CRAN/GoogleImage2Array, GitHub/GoogleImage2Array, rdrr.io/GoogleImage2Array

Version

  • 0.99.6: Added a new function, 'display.spiral'.
  • 0.99.6: Modified the 'GoogleImage2array' function.
  • 0.99.5: Fixed to be able to read jpeg and png formats.
  • 0.99.2: Published in CRAN.

Installation

  • install from CRAN (ver. 0.99.2)
install.packages("BiocManager")
BiocManager::install("EBImage")

install.packages("GoogleImage2Array", repos="http://cran.r-project.org")
  • install the latest from GitHub

type the code below in the R console window

install.packages(c("devtools", "BiocManager"), repos="http://cran.r-project.org")
BiocManager::install("EBImage")

devtools::install_github("kumeS/GoogleImage2Array")

or install from the source file

git clone https://github.com/kumeS/GoogleImage2Array
R CMD INSTALL GoogleImage2Array

Tutorial

Functions

  • GoogleImage2array: create array from image thumbnails via the google image search.
  • bind.array: bind two 4d arrays to one 4d array.
  • display.array: display 4d array as a tiled image.
  • display.spiral: display 4d array as a spiral image.

Simple usage

library(GoogleImage2Array)

#Search by persian cat
query <- "persian cat"
CatImg <- GoogleImage2array(query)

#show info
str(CatImg)
#$ array: num [1:20, 1:64, 1:64, 1:3] 0.0141 0.7029 0.7608 0.111 0.3398 ...
#$ query: chr "persian cat"

#show CatImg
display.array(CatImg)

You should have the results of the tiled images as follows.

Image_persian_cat

License

Copyright (c) 2021 Satoshi Kume

Released under the Artistic License 2.0.

Authors

  • Satoshi Kume

About

R package for Creating Array Data from 2D Image Thumbnails via Google Image Search

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published