Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

How to print Image contents #120

Open
sajis997 opened this issue Jan 5, 2020 · 1 comment
Open

How to print Image contents #120

sajis997 opened this issue Jan 5, 2020 · 1 comment

Comments

@sajis997
Copy link

sajis997 commented Jan 5, 2020

following the example at https://dahtah.github.io/imager/canny.html and have the following questions:

  1. How to print image contents( pixel values), for example nX (mentioned in the above link). I tried with the following though:

    nX
    Image. Width: 433 pix Height: 310 pix Depth: 1 Colour channels: 1
    print(nX)
    Image. Width: 433 pix Height: 310 pix Depth: 1 Colour channels: 1

  2. At source https://github.com/dahtah/imager/blob/master/R/interpolation.R and inside the function "interp <- function(im,locations,cubic=FALSE,extrapolate=TRUE)", you have called to the function interp_xy(...) with the following parameter:
    im,locations$x-1,locations$y-1,cubic=cubic

What is reason behind this -1 from both the location x-pos and y-pos ?

@Ax3man
Copy link

Ax3man commented Feb 4, 2020

To your first question: you can coerce to an array to print values, e.g. as.array(nX). Alternatively, use print.default(boats).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants