patterns and coloring for b/w 2D picture

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

patterns and coloring for b/w 2D picture

Ludwig Schreier
Hi folks,

recently I found ImageJ and started playing around with it. It is
absolutely great software with that many features and portability to
different OS.

Then I was searching the web for a particular plugin or feature to
colourize a 2D black/white pictures and in particular to give
different colouring to different patterns of that picture, but since
there are so many plugins I could not find one yet which does the job.

Do you know any plugin/feature that could handle this?

If not, do you know any other plugin(s) that do such things like
colouring of b/w pictures, identifying patterns, etc.?

I am willing to re-write code or create a new plugin, but I would
appreciate every comment or hint before diving deeper into the guts of
ij.

Thanks in advance.

Cheers,
Ludwig
Reply | Threaded
Open this post in threaded view
|

Re: patterns and coloring for b/w 2D picture

Gluender-2
Ludwig,

could you please be more specific with respect to what you call "patterns".
How are they defined and how can their boundaries be detected...
What is the scientific background of the desired colouring?

>Hi folks,
>
>recently I found ImageJ and started playing around with it. It is
>absolutely great software with that many features and portability to
>different OS.
>
>Then I was searching the web for a particular plugin or feature to
>colourize a 2D black/white pictures and in particular to give
>different colouring to different patterns of that picture, but since
>there are so many plugins I could not find one yet which does the job.
>
>Do you know any plugin/feature that could handle this?
>
>If not, do you know any other plugin(s) that do such things like
>colouring of b/w pictures, identifying patterns, etc.?
>
>I am willing to re-write code or create a new plugin, but I would
>appreciate every comment or hint before diving deeper into the guts of
>ij.
>
>Thanks in advance.
>
>Cheers,
>Ludwig

Best Herbie
Reply | Threaded
Open this post in threaded view
|

Re: patterns and coloring for b/w 2D picture

Gabriel Landini
In reply to this post by Ludwig Schreier
On Wednesday 18 March 2009 17:18:18 Ludwig Schreier wrote:
> Then I was searching the web for a particular plugin or feature to
> colourize a 2D black/white pictures and in particular to give
> different colouring to different patterns of that picture, but since
> there are so many plugins I could not find one yet which does the job.

There are no plugins for colorizing semi automatically that I know of,
although I collected a number of references in the hope that somebody will
take the challenge:
http://imagejdocu.tudor.lu/doku.php?id=wishlist:procedure:colorizing_algorithm

> If not, do you know any other plugin(s) that do such things like
> colouring of b/w pictures, identifying patterns, etc.?

Colorizing and identifying patterns are very different things...

Some time ago I needed to colour an old old print, and the following macro was
useful, but nowhere near what the references above can do.
The idea is to add a hue and saturation to a greyscale image to a user defined
ROI, while keeping the brightness constant.

One problem, however is that going from RGB to HSB to RGB many times tends to
quantise the image do to rounding errors in each conversion.

Cheers

Gabriel

//----------8<---------------
// Colourize_.txt
// G. Landini at bham. ac. uk
// Macro to facilitate colourizing greyscale images
run("RGB Color");
hue=64;
sat=127;

while(true) {
  waitForUser("Colourize", "Make a selction to paint");
  Dialog.create("Colourize");
  Dialog.addNumber("Hue", hue) ;
  Dialog.addNumber("Saturation", sat) ;
  setForegroundColor(255, 255, 255); // so when exiting it is white
  Dialog.show() ;
  hue=Dialog.getNumber();
  sat=Dialog.getNumber();
 
  run("HSB Stack");
  setSlice(1);
  setForegroundColor(hue, hue, hue);
  run("Fill", "slice");
  setSlice(2);
  setForegroundColor(sat, sat, sat);
  run("Fill", "slice");
  run("RGB Color");
}
//----------8<---------------
Reply | Threaded
Open this post in threaded view
|

Re: patterns and coloring for b/w 2D picture

Ludwig Schreier
In reply to this post by Ludwig Schreier
Hi Herbie and all,

to be more specific, have a look at Figure 1 from this (public
accessible) paper:

http://www.iop.org/EJ/article/0295-5075/67/5/800/epl8338.html

In Fig. 1/D a color map was applied to a pattern depending on the
rotation of that pattern.

In our case we are not (yet) dealing with a hexagonal 'pattern',
rather lamellar one, e.g. \\, =, //, ||.
Since I am not into AFM/SEM devices and software, I don't know what
software does the job, but would be great to know about it.
If you have any hint for writing such a plugin from scratch and got
any reference, would be great too.

Cheers,
Ludwig

On Wed, Mar 18, 2009 at 5:56 PM, Gluender <[hidden email]> wrote:

> Ludwig,
>
> could you please be more specific with respect to what you call "patterns".
> How are they defined and how can their boundaries be detected...
> What is the scientific background of the desired colouring?
>
>> Hi folks,
>>
>> recently I found ImageJ and started playing around with it. It is
>> absolutely great software with that many features and portability to
>> different OS.
>>
>> Then I was searching the web for a particular plugin or feature to
>> colourize a 2D black/white pictures and in particular to give
>> different colouring to different patterns of that picture, but since
>> there are so many plugins I could not find one yet which does the job.
>>
>> Do you know any plugin/feature that could handle this?
>>
>> If not, do you know any other plugin(s) that do such things like
>> colouring of b/w pictures, identifying patterns, etc.?
>>
>> I am willing to re-write code or create a new plugin, but I would
>> appreciate every comment or hint before diving deeper into the guts of
>> ij.
>>
>> Thanks in advance.
>>
>> Cheers,
>> Ludwig
>
> Best Herbie
>