mié

08

oct

2014

Morphological Operations

Let I an image (grayscale or binary image) and let H a mask (structuring element) where H(i,j)∈R, for (i,j)∈Z^2

  • Dilation: is defined as the maximum of the values in H added to the values of the current subimage of I,

(I⊕H)(u,v)=max{I(u+i,v+j)+H(i,j)} for ((i,j)∈H)⁡

Properties:

Brighter (dark features are reduced, bright features are thickened, background is brighter)


  • Erosion:  is defined as the minimum of the values in H differences to the values of the current subimage of I,

(I⊖H)(u,v)=min⁡{I(u+i,v+j)-H(i,j)} for ((i,j)∈H)⁡

Properties:

Darker (bright features are reduced, dark features are thickened, background is darker)


  • Opening: denotes an erosion followed by a dilation with the same structuring element H,

I∘H=(I⊖H)⊕H

Properties:

Remove point or noise.


  • Closing: denotes a dilation followed by an erosion with the same structuring element H,

I⋅H=(I⊕H)⊖H

 Properties:

Remove gaps.


  • Morphological Gradient: The dilation thickens regions in an image and the erosion shrinks them. Therefore, their difference emphasizes the boundaries between regions. If the SE is relatively small, homogeneous areas will not be affected by dilation and erosion, so the subtraction tends to eliminate them. The net result is an image with the gradient-like effect.

(I⊕H)-(I⊖H)


The follow operations, extract small elements and details from given images. These operations are used for various image processing tasks, such as feature extraction, background equalization, image enhancement, and others.


  • Top-hat Transform (or White-hat transform): of a gray-scale image I is defines as I minus its opening:

I-(I∘H)

Properties:

This operation is used for light objects on a dark background.


  • Bottom-hat Transform (or Black-hat transform): of a gray-scale image I is defines as its closing minus I:

(I⋅H)-I

Properties:

This operation is used for dark objects on a light background.

 

Source:


0 comentarios

mar

27

may

2014

Error Fiji / ImageJ: Unable to load plugin (ins)

If you want to load a new plugin and appear a message like this: 

Error: Unable to load plugin (ins)

One possible solution is to add default constructors (without parameters) to the classes. If you create only the constructors with parameters, the default constructor is no present and ImageJ (Fiji) cannot run the plugin and the programm shows this error.

 

Source: http://stackoverflow.com/questions/10784867/imagej-unable-to-load-plugins

 

0 comentarios

jue

16

ene

2014

Error in StartUp NetBeans IDE 7.4

If you start NetBeans and appear a message like this:

One possible solution is the next.

 

The message names the module or modules that fail to start. 

 

Look at: C:\Program Files\NetBeans 7.4\ide\modules (Windows 7)

 

Copy and paste in: 

              C:\Users\<users>\AppData\Roaming\NetBeans\7.4\modules (Windows 7)

0 comentarios

mar

14

ene

2014

Configure Git in NetBeans

Currently, the majority of open source development projects and a large number of corporate projects use Subversion to manage their source code.

 

ImageJ / Fiji working with Git like repository.

 

More information about these repositories in:

 

Git for ImageJ: https://github.com/imagej/imagej1/commits/

Git for Fiji: http://fiji.sc/Git

 

Well, every Git working directory is a full-fledged repository with complete history and full version tracking capabilities, not dependent on network access or a central server. Using this software will make your life easier.

 

To configure in NetBeans, next these steps:

1/3 - Open NetBeans → Team Menu → Git → Initialize Repository...

2/3 - Rigth click over the project → Versioning → Initialize Git Repository...

3/3 - In "Output Window", show messages to go seeing the configuration.

0 comentarios

mar

14

ene

2014

Install NetBeans to develop plugins for ImageJ

If you haven’t installed a JDK in your PC, you can install together JDK and Netbeans, click here and follow these steps:

 

http://www.oracle.com/technetwork/java/javase/downloads/index.html

 


You must accept the Code License Agreement to continue and selected one version:

When the last version of Java SE Development Kit was installed, follow these steps to install and configure NetBeans:

The box with the label "JDK for the NetBeans IDE", shows a the last version installed:

Click install to start the installation and next steps.

 

If you want see these images bigger, you click here:

4 comentarios

mar

08

oct

2013

Exception in Fiji or ImageJ: Unsupported major.minor version 51.0

The message from Exception is:

 

"java.lang.UnsupportedClassVersionError: "nameProject or plugin": Unsupported major.minor version 51.0

 

This plugin requires Java 1.7 or later"

 

This happened when you compile the classes with an IDE such as Eclipse or Netbeans and that you did not change the JDK to 1.6 but left it at 1.7 (AKA Java7). 

 

Two possible solutions: switch the IDE to a lower JDK, or run ImageJ with a newer JRE. 

 

In my case, when I had this exception, I did the first option.

I use NetBeans and put a lower JDK, for this: right click about the project and click in properties.

In Source /Binary Format change of JDK.

Now, run the plugin other time and... ready!

0 comentarios

vie

04

oct

2013

Image Calculator...

This is an example of how it works Image Calculator function in ImageJ or Fiji. (Process → Image Calculator...)

 

These are the original images:

 

Image A

Image B


Add

A(u,v)  A(u,v) + B(u,v)

Multiply

A(u,v) A(u,v)*B(u,v)

AND

A(u,v) A(u,v) ˄B(u,v)

 

Bitwise AND operation.

XOR

A(u,v)A(u,v) XOR B(u,v)

 

Bitwise exclusive OR (XOR) operation.

max

A(u,v)max(A(u,v),B(u,v))

difference

A(u,v)ǀ A(u,v) – B(u,v) ǀ

Subtract

A(u,v) A(u,v) – B(u,v)

Divide

A(u,v) A(u,v)/B(u,v)

OR

A(u,v) A(u,v)˅B(u,v)

 

Bitwise OR operation.

min

A(u,v)min(A(u,v),B(u,v))

average

A(u,v) (A(u,v)+B(u,v))/2


0 comentarios

lun

30

sep

2013

NetBeans JVM Created Failed

If you work in NetBeans 7.1.1 to develop your plugins or macros, maybe you have seen this message, you can do the next steps.

 

1.- Find the setup path, in my case:

        C:\Program Files (x86)\NetBeans 7.1\etc

2.- Copy the file netbeans.conf

 

 

 

3.- Modify this file (netbeans.conf) and insert the next line:

                           -J-XX:MaxPermSize=200m

     Here:

4.- Save, restart NetBeans and enjoy coding.

0 comentarios

vie

17

may

2013

Types of plugins

Before developing a plug-in for ImageJ / Fijian must think that kind is going to be, and this depends on the input data:

  • If you do not require an image as input: PlugIn
  • If requires that an open image: PlugInFilter
  • And if the plugin runs in its own window: PlugInFrame

 

Its interfaces are:

PlugIn:

void run (java.lang.String arg) //this method runs the plugin. "arg" is an argument to the plugin, which can be empty string.

 

PlugInFilter:

void run (ImageProcessor ip) //this method runs the plugin. It takes the image processor and it works on as an argument.

 

int setup (java.lang.String arg, ImagePlus imp) //this method sets up the plugin filter use. The "arg" string has the same function as in the run method of the PlugIn interface.

 

PlugInFrame:

       //this is a subclass of an AWT frame that implementes the PlugIn
          interface.

PlugInFrame(java.lang.String title) 

void run (java.lang.String arg) //declared in the PlugIn interface is implemented and can be overwritten by your plugin's run method.

 

Source: here.

0 comentarios