I need your help

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

I need your help

Kazuaki Kobayashi
Hi!

I've got a problem and don't know how to solve it,
so I would like you to help me

Before explaining my problem,
what I do is :
I capture an image at an regular interval
and pass the image as a parameter to ParticleAnalyzer.analyze(ImagePlus imp, ImageProcessor ip) method.
I use the result to process my own task then.

This program worked quite well and seemed there was no problem
at first.

(from here is my problem)
But suddenly an error occured and the error dialog says
"A thresholded image or an 8-bit binary image is
required. Refer to Image->Adjust->Threshold
or to Process->Binary->Threshold"

This error occurs in a method of
source/ij/plugin/filter/ParticleAnalyzer

To make matters worse, there is no repeatability for this error.
My programm finishes without any error in almost all trials,
but while running my programm again and again, sometimes the error occurs.

From my experience, rebooting the PC can help avoid this error.
so I thought the reason was something related to memory and I tried
IJ.freeMemory() method, but didn't work.

can anyone help me?
Reply | Threaded
Open this post in threaded view
|

Re: I need your help

Wayne Rasband
> I've got a problem and don't know how to solve it,
> so I would like you to help me
>
> Before explaining my problem,
> what I do is :
> I capture an image at an regular interval
> and pass the image as a parameter to
> ParticleAnalyzer.analyze(ImagePlus imp, ImageProcessor ip) method.
> I use the result to process my own task then.
>
> This program worked quite well and seemed there
> was no problem at first.
>
> (from here is my problem)
> But suddenly an error occured and the error dialog says
> "A thresholded image or an 8-bit binary image is
> required. Refer to Image->Adjust->Threshold
> or to Process->Binary->Threshold"

Are you setting the threshold levels using ij.setThreshold()?

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: I need your help

Kazuaki Kobayashi
Thank you for your reply.

Yes, I use ij.setThreshold() method in my programm,
and I tried ij.process.ImageProcessor.convertToByte(), too
in order to get a thresholded or 8-bit binary image as the dialog says.

Do you have any idea about what's wrong with it?

--- "ImageJ Interest Group" <[hidden email]> ---

>Are you setting the threshold levels using ij.setThreshold()?
>
>-wayne