Coder Social home page Coder Social logo

Cooccurrence Matrix about imagej-ops HOT 6 CLOSED

imagej avatar imagej commented on July 21, 2024
Cooccurrence Matrix

from imagej-ops.

Comments (6)

dietzc avatar dietzc commented on July 21, 2024

Which MatLab implementation?
Which branch is affected?
...

from imagej-ops.

IdealOutage avatar IdealOutage commented on July 21, 2024

More Information: The affected branch is firstorderstatistics.

I have used the Matlab Image Processing Toolbox function graycomatrix to create the Cooccurence Matrix. To reproduce this here is the Matlab Code to create the Cooccurence Matrix.

    imggrey = imread('path_to_file');
    glcm = graycomatrix(imggrey, 'NumLevels', 32, 'Offset', [-1 1], 'Symmetric', true)

To get the Cooccurence Matrix in Java.

    final HaralickDescriptorSet<IterableInterval> desc = new HaralickDescriptorSet<IterableInterval>(
        context, IterableInterval.class);

    final Img<UnsignedByteType> img = (Img<UnsignedByteType>) new ImgOpener().openImg(
        "path_to_file").getImg();

    desc.compile();
    desc.update(img);

    desc.updateParameterNrGrayLevels(32);
    desc.updateParameterDistance(1);
    desc.updateParameterOrientation(MatrixOrientation.DIAGONAL);

    for (final Pair<String, DoubleType> res : desc) {
        System.out.println(res.getA() + " " + res.getB().get());
    }

from imagej-ops.

dscho avatar dscho commented on July 21, 2024

@DanielSeebacher could you also post the different outputs? Maybe I can guess from those what is happening...

from imagej-ops.

IdealOutage avatar IdealOutage commented on July 21, 2024

@dscho Of course, you can see the results in the attached .csv files.

https://dl.dropboxusercontent.com/u/6538897/matlab_results.csv
https://dl.dropboxusercontent.com/u/6538897/java_results.csv

from imagej-ops.

dietzc avatar dietzc commented on July 21, 2024

I think I found the bug and fixed it. @DanielSeebacher can you check, confirm and close the issue?

from imagej-ops.

dietzc avatar dietzc commented on July 21, 2024

fixed!

from imagej-ops.

Related Issues (20)

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.