Coder Social home page Coder Social logo

leafarea's People

Contributors

mattocci27 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

Watchers

 avatar  avatar  avatar

leafarea's Issues

run.ij returning area but not perimeter

Hi there,

I have been using the run.ij command as follows:

run.ij(path.imagej = NULL, set.memory = 4, set.directory,
distance.pixel = 2475.6, known.distance = 21, trim.pixel = 20,
low.circ = 0, upper.circ = 1, low.size = 0.1,
upper.size = "Infinity", prefix = "\.|-", log = F,
check.image = F, save.image = F)

The area function is working well and returns this:

run.ij(path.imagej = NULL, set.memory = 4, set.directory,

  •    distance.pixel = 2475.6, known.distance = 21, trim.pixel = 20,
    
  •    low.circ = 0, upper.circ = 1, low.size = 0.1,
    
  •    upper.size = "Infinity", prefix = "\\.|-", log = F,
    
  •    check.image = F, save.image = F)
    
    Area Mean Min Max XStart YStart
    1 2.074 116.245 63 173 698 875
    Area Mean Min Max XStart YStart
    1 19.907 117.479 54 180 956 481
    Area Mean Min Max XStart YStart
    1 35.014 114.129 52 177 1364 706
    Area Mean Min Max XStart YStart
    1 19.921 117.326 59 180 1226 264
    2 34.971 111.526 58 180 442 859
    3 2.095 114.944 62 180 1309 1287
    4 1.012 112.259 60 180 1037 1798
    Area Mean Min Max XStart YStart
    1 1.009 113.158 59 171 718 970
    sample total.leaf.area
    1 Scan 1.009
    2 Scan 1 2.074
    3 Scan 2 19.907
    4 Scan 3 35.014
    5 Scan 5 57.999

** These are scans from pieces of paper of known size to check

How do I add the perimeter to this as well? I had a look at the 'adding perim' section but I'm confused sorry.
Cheers

Error in R package LeafArea

Dear Mr. Masatoshi Katabuchi,

I have used your R package LeafArea.
I used images JPEG of zuquini leaves for estimat leaf area in the 2017 with succefull.
But now, in 2018, i am with problem and I have not found a solution yet.
I am doing the same way and not is ok.
If you can help me, I'd appreciate it.
Thanks

The error is:

Error in FUN(X[[i]], ...) :
only defined on a data frame with all numeric variables

My codes son:

library(LeafArea)
run.ij(path.imagej = NULL, set.memory = 6, 'C:/Foto/Bloco1/BRQ1B1',distance.pixel = 37.2175,

  •    known.distance = 1, trim.pixel = 500, low.circ = 0, upper.circ = 1,
    
  •    low.size = 5, upper.size = "Infinity", prefix = "\\.|-",log=F,
    
  •    check.image=F,save.image=T)
    

C:\Users\gusta\Documents>pushd C:\Program Files\ImageJ\

C:\Program Files\ImageJ>jre\bin\java -jar -Xmx6g ij.jar -batch C:\Users\gusta\AppData\Local\Temp\RtmpSGqBHD\macro10446825408b.txt C:/Foto/Bloco1/BRQ1B1/
Perim. XStart YStart
1 201.767 1741 579

C:\Program Files\ImageJ>pause
Press any key to continue. . .

C:\Program Files\ImageJ>exit
Error in FUN(X[[i]], ...) :
only defined on a data frame with all numeric variables

No Images Error

I'm using this package (specifically the dev version with parameter) for automated extraction of leaf trait data but recently ran into an error that I have been unable to solve. I've looked through the other threads and seen some troubleshooting that was recommended for a similar problem, so I tried those but it didn't help. I've used this package for months without issue but until recently it stopped working and I'm unsure why. Here is what I have tried thus far:

  • Run from console or terminal (didn't work)
  • update software (didn't work)
  • ensure only jpg images (didn't work)
  • tried jpg images I've previously measured with package (didn't work)
  • tried short directory (didn't work)
  • tried shortened command with only directory defaults (didn't work)
  • reinstalled imageJ (didn't work)
  • tried on backup laptop (DOES work, but don’t know why my main doesn’t?)

Here's an image of the error I get when I try to run it.
image

The error I am getting in the console is:
Error in [.data.frame(X[[i]], ...) : undefined columns selected

results error

Dear Mr. Masatoshi Katabuchi,
I am using your package to analyze the area of six rice leaves in a figure.
The result generated by your package is 97.389, but the results from ImageJ by manual analysis is 1076.088.
So I do not keno which one is right.
This is the code I used in the analysis.

res <- run.ij(path.imagej = 'E:/ImageJ/ImageJ',
              set.directory = 'C:/Users/Administrator/Desktop/test/')

Any reply is appreciated.
Thank you!

Documentation path Linux

For Linux, where for example ImageJ standalone is in a directory ~/ImageJ, when specifying the ImageJ path in run_ij the documentation gives the impression path.imagej should be ~/ImageJ, but the function run_ij appends ImageJ to the path, giving error Specify the correct path to ImageJ.

Maybe could make it clear in the documentation "path to directory containing ImageJ directory" or adjust the run_ij function:

unix.check <- Sys.info()["sysname"]
  if (unix.check == "Linux") {
    if (file.exists(paste(path.imagej, "ij.jar", 
                          sep = "")) != T & file.exists(paste(path.imagej, "ij.jar", sep = "/")) != T) {
      warning("Specify the correct path to ImageJ")
      return("ImageJ not found")
    }
  }

Unable to find Java in updated ImageJ

Dear Dr. Katabuchi,

I've found a small bug caused by a change in filepath in the most recent ImageJ. After receiving the "ImageJ not found" error, I discovered that more accurately, Java isn't found. Your code locates Java in "Contents/Resources/Java/ij.jar"; however, it now resides in "Contents/Java/ij.jar". My work around is to move the Java file into Resources which allows the code to run, although it still displays a hefty error message at the end:
Warning messages: 1: In if (imagej == "ImageJ not found") return("ImageJ not found") else path.imagej <- imagej : the condition has length > 1 and only the first element will be used 2: In if (file.exists(paste(path.imagej, "Contents/Resources/Java/ij.jar", : the condition has length > 1 and only the first element will be used 3: In if (temp.slash2 != "/") { : the condition has length > 1 and only the first element will be used

Thank you for writing and maintaining this code.

Best,
Hilary Rose Dawson

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.