Coder Social home page Coder Social logo

mmand's People

Contributors

jonclayden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmand's Issues

boxKernel() in rescale() produces "checkered" plot

Hi there, I think I found another bug. Not 100% sure though, since am not fully able to deduce what the boxKernel() is actually supposed to do in rescale(). Anyway, when I do

  mat <- raster::as.matrix(spObj)
  mat_resc <- mmand::rescale(mat, 2, kernel)
  spObj_resc <- raster::raster(mat_resc)
  raster::extent(spObj_resc) <- raster::extent(spObj)
  sp::proj4string(spObj_resc) <- sp::proj4string(spObj)

spObj obviously is a binary raster with certain dimensions (97, 201, 19497 (nrow, ncol, ncell)) and spObj_resc with double the nrows/ncols and four times the ncells (194, 402, 77988 (nrow, ncol, ncell)), as expected. What is not expected though, is that when plotting spObj_resc (raster::plot(), but its the same with display() on mat_resc), I get a funny looking raster, where only the lower right cell (of four cells) is "filled" with a value, while the other three (presumably new created cells) have the value 0. This is also irrespective of binary or continuous raster.

Moreover, if I chose a values for factor of for instance 0.5, something similar arises, however on the scale of the whole plot, only the upper left fourth of the downscaled plot is shown.

These issues don't seem to arise at least with the mnKernel(), didn't test the others though.
spObj is still the same.

components(): objects with same label across mat-borders

Great package! I am about to use it as dependency for a package I am working on myself atm. However, I think I found a bug.
Consider the following code:

  mat <- raster::as.matrix(spObj)
  kernel <- shapeKernel(c(3, 3), type="diamond")
  mat_cc <- mmand::components(mat, kernel)

It seems (at least on my machine) that connected components at the bottom and at the top share the same label. I think this is not intentional, is it? Here is spObj

Literal Threshold problem

Hi!

When i apply a literal value for the threshold, nothing is rendered when using 'display' on the resulting image. The matrix values are correct, but no image is displayed, only the quartz window pops up blank (when using method='kmeans' it works properly)

Any idea of what could it be?

Thanks in advance!

Scope of Algorithms

The type of morphology implemented seems to be "binary". Can it do "greyscale" morphology ? If not, could it be mentioned in the documentation ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.