IJ Blob plugin array out of bound error...!

Dear @twagner and others…,

I am trying to use the plugin ij.blob a simple few lines would be as follows according to the ij.blob page .

import ij.ImagePlus;
import ij.blob.ManyBlobs;

public class Features {

    public ManyBlobs allBlobs;

    public void Circularity(ImagePlus imp){

        ManyBlobs allBlobs = new ManyBlobs(imp); // Extended ArrayList
        allBlobs.findConnectedComponents(); // Start the Connected Component Algorithm
        double peri = allBlobs.get(0).getPerimeter(); // Read the perimeter of a Blob

But this will through out a array out of bound error? Does some one ever try this.

Exception in thread “Run$_AWT-EventQueue-0” java.lang.ArrayIndexOutOfBoundsException: -633
** at ij.process.ByteProcessor.get(ByteProcessor.java:262)**
** at ij.blob.ConnectedComponentLabeler.isBackground(ConnectedComponentLabeler.java:317)**
** at ij.blob.ConnectedComponentLabeler.isNewExternalContour(ConnectedComponentLabeler.java:304)**
** at ij.blob.ConnectedComponentLabeler.doConnectedComponents(ConnectedComponentLabeler.java:103)**
** at ij.blob.ManyBlobs.findConnectedComponents(ManyBlobs.java:113)**

Best regards…!

Try to specify the the background color:


Thank you very much. That solves the problem. I am very sorry to disturb you because you look bit away from the form.

I’ve updated the corresponding wiki entry:

1 Like

Yep, Now it seems fine. again thank you…!