Skip to main content

Image Data

  • Chapter
Book cover Humanities Data in R

Abstract

In this chapter, methods for loading, manipulating, and saving image files in R are presented. Dimension reduction and clustering analysis are developed in order to visually represent a corpus of images in standard scatter plots.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 99.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    http://www.ee.columbia.edu/~dvmmweb/dvmm/downloads/PIM_PRCG_dataset/techreport_personal_columbia.html.

  2. 2.

    The formula for circular median is not too complex; if you want to avoid loading another library, the following:atan2(mean(sin(mat[1,]*2*pi)), mean(cos(mat[1,]*2*pi))) / (2*pi) can be used in place of the median.circular(…) call (it is actually much faster).

  3. 3.

    For a detailed description and visualization of the underlying algorithm see [1].

  4. 4.

    To improve the final image, we also permute the set 1:length(files) using the sample function. The order matters in this case because the later images are overplotted on the first images. The default order of the files is not as visually pleasing as a random permutation as the original ordering was sorted by size and category.

References

  1. Elke Achtert, Hans-Peter Kriegel, and Arthur Zimek. Elki: a software system for evaluation of subspace clustering algorithms. In Scientific and Statistical Database Management, pages 580–585. Springer, 2008.

    Google Scholar 

  2. C. Agostinelli and U. Lund. R package circular: Circular Statistics (version 0.4-7). CA: Department of Environmental Sciences, Informatics and Statistics, Ca’ Foscari University, Venice, Italy. UL: Department of Statistics, California Polytechnic State University, San Luis Obispo, California, USA, 2013. URL https://r-forge.r-project.org/projects/circular/.

  3. Gary Bradski and Adrian Kaehler. Learning OpenCV: Computer vision with the OpenCV library. “ O’Reilly Media, Inc.”, 2008.

    Google Scholar 

  4. Robert M Haralick, Karthikeyan Shanmugam, and Its’ Hak Dinstein. Textural features for image classification. Systems, Man and Cybernetics, IEEE Transactions on, (6): 610–621, 1973.

    Google Scholar 

  5. Trevor Hastie, Robert Tibshirani, Jerome Friedman, T Hastie, J Friedman, and R Tibshirani. The elements of statistical learning, volume 2. Springer, 2009.

    Google Scholar 

  6. Tony Lindeberg. Scale invariant feature transform. Scholarpedia, 7(5):10491, 2012.

    Google Scholar 

  7. Nikhil R Pal and Sankar K Pal. A review on image segmentation techniques. Pattern recognition, 26(9):1277–1294, 1993.

    Google Scholar 

  8. Alvy Ray Smith. Color gamut transform pairs. In ACM Siggraph Computer Graphics, volume 12, pages 12–19. ACM, 1978.

    Google Scholar 

  9. Simon Urbanek. png: Read and write PNG images, 2013. URL http://CRAN.R-project.org/package=png. R package version 0.1-7.

  10. Simon Urbanek. tiff: Read and write TIFF images, 2013. URL http://CRAN.R-project.org/package=tiff. R package version 0.1-5.

  11. Simon Urbanek. jpeg: Read and write JPEG images, 2014. URL http://CRAN.R-project.org/package=jpeg. R package version 0.1-8.

  12. Alex Zvoleff. glcm: Calculate textures from grey-level co-occurrence matrices (GLCMs) in R, 2015. URL http://CRAN.R-project.org/package=glcm. R package version 1.2.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Arnold, T., Tilton, L. (2015). Image Data. In: Humanities Data in R. Quantitative Methods in the Humanities and Social Sciences. Springer, Cham. https://doi.org/10.1007/978-3-319-20702-5_8

Download citation

Publish with us

Policies and ethics