Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / July 2009

Tip: Looking for answers? Try searching our database.

ImageJ - removing white blobs of a certain size...

Thread view: 
almurph@altavista.com - 02 Jul 2009 15:25 GMT
Hi,

    Any know how to use the ImageJ API to remove objects of a certain
size (say white objects on a black background). I would greatly
appreciate any hints/comments/suggestions that you may have.

Thanks in advance,
Al.
John B. Matthews - 02 Jul 2009 15:56 GMT
In article
<b3c05cb3-d86f-4bca-9ff1-b3af6b811a20@18g2000yqa.googlegroups.com>,

>     Any know how to use the ImageJ API to remove objects of a certain
> size (say white objects on a black background). I would greatly
> appreciate any hints/comments/suggestions that you may have.

You might look at "ImageJ Tutorial (PPT) and Example Images," near the
end:

<http://rsb.info.nih.gov/ij/docs/examples/index.html>

Signature

John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

rossum - 02 Jul 2009 16:04 GMT
>Hi,
>
[quoted text clipped - 4 lines]
>Thanks in advance,
>Al.
Break the problem down into smaller parts:

- can you identify a pixel of the appropriate colour?
- can you identify all pixels of that colour that are attached
(directly or indirectly) to the original pixel?  An outlining
algorithm may help here.
- can you determine whether the area is the correct size?
- can you replace all the appropriate pixels with another colour?

rossum
Roedy Green - 02 Jul 2009 19:05 GMT
On Thu, 2 Jul 2009 07:25:43 -0700 (PDT), "almurph@altavista.com"
<almurph@altavista.com> wrote, quoted or indirectly quoted someone who
said :

>    Any know how to use the ImageJ API to remove objects of a certain
>size (say white objects on a black background). I would greatly
>appreciate any hints/comments/suggestions that you may have.

Here is a way.

Impose a grid on your image fine enough so that any white blob of
interest would have to touch at least one grid point.

Test each grid point to see if it is white.  If it is, examine
surrounding points in ever-expanding contours till you find the edges
of the white region. As you expand, track how many white pixels are in
the blob.  If the number in is range change the colour of the blob,
perhaps by a reverse process of averaging surrounding pixel colours,
working inwards.
Signature

Roedy Green Canadian Mind Products
http://mindprod.com

"Deer hunting would be fine sport, if only the deer had guns."
~ William S. Gilbert of Gilbert and Sullivan



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.