Sobel operator and laplacian operator after image correction

Hi everybody,

New to ImageJ and FIJI. I have 0 experience with using this software and my colleagues are of no help in this matter.

Please, maybe someone can help me with what I would like to do. Been trying to figure this out with FeatureJ and MorphoLib, but no luck.

Some background:

  1. I have two hundred images, of three dozen distinct specimens, each with at least one distinct ROI.
  2. There is some background noise. Background should be with no measurable signal intensity.
  3. Color images - when I split channels, the signal is in the green channel.

What I would like to do:

  1. Correct the image by removing background noise so it is not picked up as an ROI.
  2. Auto analyze/count the ROI and compute intensity of the ROI.
  3. Analyze the gradient of the signal intensity using Sobel operator.
  4. Analyze the gradient of the signal intensity using Laplacian operator.

Please, what is the proper order of operations to do this? Can this be Macro’d for batch analysis?

The final calculations I am interested in are:
Sobel / intensity
Laplacian / sobel
Laplacian / Intensity

Thank you kindly.



bump da bump

I will post an image in the next post.

Sample image of what I would like to analyze.

Maybe somebody can help me.

thanks20170629161532.00.BMP (5.9 MB)

Hi @y_cant_icg

thanks for sharing the image. I wrote a batch macro for Fiji that does some of the transformations and measurements that I believe you are looking for, but there are some things from your questions that I am afraid did not understand fully

Which regions of your image exactly are you interested in? Maybe you could use paint to draw a circle around whats interesting to you in your example image to help understanding.

The image looks like it is from a fluorescently labeled specimen. Ideally, fluorescent images are mono-chromatic. So if your setup uses something else than a color-camera then splitting would not be necessary, you could just acquire the green channel alone.
In case the images are stored from your microscope in a different file format than *.bmp then I would recommend to work on the raw images instead and keep file conversions to a minimum.

I am not certain what you wish to analyze exactly here

The below macro is written in the imageJ macro language and does batch processing of all image files in a given directory. If there are other files in the same directory the macro will fail. Here is what it does:

I hope the comments in the macro are helpful to understand whats going on and can serve as a starting point to get you into image processing and scripting:

//@ File(label="Select a directory", style="directory") input_dir
//@ Integer(label="subtract background!", description="lower value means stronger subtraction, 0=no subtraction", value=50) background
//@ Integer(label="merge fragments", description="higher values mean less fragments, 0=no merging", value=0) gauss

// a list of all files in the input directory. should be images
list = getFileList(input_dir);

// uncomment the next line to hide the windows from popping up
// setBatchMode(true);

// set the measuremnets 
run("Set Measurements...", "area mean standard min shape feret's integrated redirect=None decimal=3");

// batch: for all images in the input directory, do...
for (i=0; i<list.length; i++) {
    // open the image, channel 2 only
    incoming = input_dir+File.separator+list[i];
    run("Bio-Formats Importer", "open=[" + incoming + "] autoscale color_mode=Composite rois_import=[ROI manager] specify_range view=Hyperstack stack_order=XYCZT c_begin=2 c_end=2 c_step=1");

    // get the title of the image
    title = getTitle();
    // subtract the background. lower values = harsher subtraction
    if (background > 0) {
    run("Subtract Background...", "rolling=" + background + " sliding");
    //optional gaussian filter.choose higher values to merge structures together
    if (gauss > 0) {
        run("Gaussian Blur...", "sigma=" + gauss);
    //identfiy object above threshold chosen by Otsu method
    run("Auto Threshold", "method=Otsu white");
    // measure object features as defined in set measuremnts
    run("Analyze Particles...", "size=2-Infinity pixel show=Nothing display clear add");
    // save analyzed regions
    roiManager("Save", incoming + "");
    // save results table
    saveAs("Results", incoming + "_Results.txt");
    // close all images if more then one was in the input folder
    if (list.length > 1) {
        run("Close All");